mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-10-06 23:26:55 +01:00
Address Jesper Schulz-Wedde's review on PR #158
- use-generateguid-for-unique-test-fixture-values.md: GenerateGUID() is a Code[10] number-series value, not a real GUID; truncating it with CopyStr for a shorter field cuts off the changing digits. Point to GenerateRandomCode/GenerateRandomCodeWithLength/GenerateRandomXMLText instead, which verify uniqueness against the actual table. - Split use-testpage-visible-enabled-to-verify-field-ui-state.md: drop its editability claim (the sample opens with OpenView() and asserts Enabled(), which verifies enabled state, not editability — Editable() and Enabled() are distinct TestField methods). New companion article use-testpage-editable-to-verify-field-editability.md covers Editable() with OpenEdit() specifically. - Wire GenerateGUID/CopyStr and TestPage Visible/Enabled/Editable cues into al-testing-review.md, and the Item Ledger Entry/Last Shipping No. posting cue into al-data-modeling-review.md. The Item Ledger Entry article itself was independently verified against current BCApps source and needs no changes. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
1028aacd4f
commit
e538664a50
9 changed files with 98 additions and 10 deletions
|
|
@ -6,7 +6,13 @@ codeunit 50132 "Sample Customer Type Library"
|
|||
procedure CreateCustomerType(var CustomerType: Record "Customer Type")
|
||||
begin
|
||||
CustomerType.Init();
|
||||
CustomerType.Code := CopyStr(LibraryUtility.GenerateGUID(), 1, MaxStrLen(CustomerType.Code));
|
||||
// Code is shorter than GenerateGUID()'s 10 characters, so use
|
||||
// GenerateRandomCode instead of truncating a GUID ourselves — it
|
||||
// verifies uniqueness against the table rather than just returning
|
||||
// a truncated slice of the number series.
|
||||
CustomerType.Code := LibraryUtility.GenerateRandomCode(CustomerType.FieldNo(Code), Database::"Customer Type");
|
||||
// Description is long enough to hold the full GenerateGUID() value
|
||||
// untruncated, so no uniqueness verification is needed here.
|
||||
CustomerType.Description := CopyStr(LibraryUtility.GenerateGUID(), 1, MaxStrLen(CustomerType.Description));
|
||||
CustomerType.Insert(true);
|
||||
end;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue