mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-10-07 07:36:54 +01:00
Add 4 more AL/BC testing patterns from Luc van Vugt's fluxxus.nl blog
Fourth batch from CURABIS ApS, mined from an external BC/NAV testing expert's blog archive (fluxxus.nl). Confirm+StrSubstNo interaction with ConfirmHandler, Table Relation Test's OnAfterRemoveTableRelation exclusion hook (verified against BCApps source, codeunit 134926), committing shared lazy-Initialize fixture data, and Assert.IsFalse vs asserterror for boolean checks.
This commit is contained in:
parent
07e324ddbc
commit
12b7f73d24
12 changed files with 218 additions and 0 deletions
|
|
@ -0,0 +1,18 @@
|
|||
codeunit 50143 "Sample Doc Amount Test"
|
||||
{
|
||||
Subtype = Test;
|
||||
|
||||
[Test]
|
||||
procedure DocAmountIsNotVerifiedWhenLinesAreMissing()
|
||||
var
|
||||
Assert: Codeunit Assert;
|
||||
PurchHeader: Record "Purchase Header";
|
||||
begin
|
||||
Assert.IsFalse(VerifyDocAmount(PurchHeader), 'Doc. amount should not verify with no lines.');
|
||||
end;
|
||||
|
||||
local procedure VerifyDocAmount(var PurchHeader: Record "Purchase Header"): Boolean
|
||||
begin
|
||||
exit(false);
|
||||
end;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue