PacktPublishing / Automated-Testing-in-Microsoft-Dynamics-365-Business-Central-Second-Edition

Automated Testing in Microsoft Dynamics 365 Business Central - Second Edition, published by Packt
MIT License
39 stars 24 forks source link

Test Scenario #0202: implementation of "[THEN] Updated lookup value" in database is arguable #34

Open lvanvugt opened 1 year ago

lvanvugt commented 1 year ago

The implementation of second THEN of Test Scenario #0202 [THEN] Updated lookup value in database is arguable. It is now implemented as:

local procedure VerifyLookupValueInDatabase(LookupValueCode: Code[10]; Response: Text)
var
    LookupValue: Record LookupValue;
begin
    LookupValue.Get(LookupValueCode);
    VerifyLookupValueInResponse(Response, LookupValue);
end;

Two issues that could be argued about:

  1. VerifyLookupValueInResponse is already covered by the first THEN in this scenario: [THEN] Updated lookup value in response
  2. LookupValue.Get should be replaced by a method from Library - Assert