mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-10-05 14:46:55 +01:00
Address review guidance feedback
Preserve independent event seams, cover loop-carried handled state, strengthen checkpoint and UI-handler fixtures, and align DeleteAll fallback guidance. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 10646e50-2d8b-4cca-b02b-dfa78629e6a1
This commit is contained in:
parent
5f1cff2fb6
commit
ead337f9cb
11 changed files with 91 additions and 26 deletions
|
|
@ -4,11 +4,11 @@ codeunit 50401 "Test UI Handler Proof Bad"
|
|||
|
||||
[Test]
|
||||
[HandlerFunctions('CustomerCardHandler')]
|
||||
procedure CustomerCardActionSucceeds()
|
||||
procedure PreSetBooleanDoesNotProveCustomerCardResult()
|
||||
var
|
||||
Customer: Record Customer;
|
||||
begin
|
||||
Customer.Get('10000');
|
||||
LibrarySales.CreateCustomer(Customer);
|
||||
ActionSucceeded := true;
|
||||
|
||||
Page.RunModal(Page::"Customer Card", Customer);
|
||||
|
|
@ -17,12 +17,42 @@ codeunit 50401 "Test UI Handler Proof Bad"
|
|||
Assert.IsTrue(ActionSucceeded, 'The customer card action failed.');
|
||||
end;
|
||||
|
||||
[Test]
|
||||
[HandlerFunctions('CustomerCardHandler')]
|
||||
procedure MissingMessageHandlerFailsAtRuntime()
|
||||
var
|
||||
Customer: Record Customer;
|
||||
begin
|
||||
LibrarySales.CreateCustomer(Customer);
|
||||
|
||||
Page.RunModal(Page::"Customer Card", Customer);
|
||||
Message('Customer card closed.');
|
||||
end;
|
||||
|
||||
[Test]
|
||||
[HandlerFunctions('CustomerCardHandler,UnusedConfirmHandler')]
|
||||
procedure UnreachedListedHandlerFailsAtRuntime()
|
||||
var
|
||||
Customer: Record Customer;
|
||||
begin
|
||||
LibrarySales.CreateCustomer(Customer);
|
||||
|
||||
Page.RunModal(Page::"Customer Card", Customer);
|
||||
end;
|
||||
|
||||
[ModalPageHandler]
|
||||
procedure CustomerCardHandler(var CustomerCard: TestPage "Customer Card")
|
||||
begin
|
||||
end;
|
||||
|
||||
[ConfirmHandler]
|
||||
procedure UnusedConfirmHandler(Question: Text[1024]; var Reply: Boolean)
|
||||
begin
|
||||
Reply := true;
|
||||
end;
|
||||
|
||||
var
|
||||
Assert: Codeunit "Library Assert";
|
||||
LibrarySales: Codeunit "Library - Sales";
|
||||
ActionSucceeded: Boolean;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ codeunit 50400 "Test UI Handler Capture Good"
|
|||
var
|
||||
Customer: Record Customer;
|
||||
begin
|
||||
Customer.Get('10000');
|
||||
LibrarySales.CreateCustomer(Customer);
|
||||
CapturedCustomerNo := '';
|
||||
|
||||
Page.RunModal(Page::"Customer Card", Customer);
|
||||
|
|
@ -24,5 +24,6 @@ codeunit 50400 "Test UI Handler Capture Good"
|
|||
|
||||
var
|
||||
Assert: Codeunit "Library Assert";
|
||||
LibrarySales: Codeunit "Library - Sales";
|
||||
CapturedCustomerNo: Code[20];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue