bcquality/microsoft/knowledge/testing/test-data-must-be-random-and-complete.good.al
Michael Dieringer 057e17c202 Add 18 community AL/BC patterns across style, data-modeling, web-services, appsource, breaking-changes, performance, and testing
Contributed by CURABIS ApS, generalized from patterns observed across real AppSource/PTE development. Each article follows the knowledge file format (frontmatter, Description/Best Practice/Anti Pattern, sibling .good.al/.bad.al samples).
2026-09-21 22:24:07 +02:00

13 lines
407 B
Perl

[Test]
procedure PostsSalesOrderForRandomCustomer()
var
Customer: Record Customer;
SalesHeader: Record "Sales Header";
begin
// Random, collision-free customer — no assumption about what exists.
LibrarySales.CreateCustomer(Customer);
LibrarySales.CreateSalesHeader(
SalesHeader, SalesHeader."Document Type"::Order, Customer."No.");
// ... add lines, post, assert ...
end;