Hi All
Using BC 13 on-prem. I'm an end user writing test (so no dev license or test libs or access to Application Test Toolkit)
I need to write a test using a test part that checks that there no records matching a filter.
Use case is, user changes ship method to FLOC, the extension inserts a freight line with item FLOC, but it also has to delete any freight lines that match item 'FCOM | FJOB | FRES | FLIFT'
So I'm trying to write a test to assert that a filter on the TestPart returns zero records. Only assertions I seem to have available to me are asserterror and .Assertequals. I tried this
//[THEN] There should be no sales lines of type FCOM, FJOB, FRES, FLIFT
SalesLines.Filter.SetFilter("Document Type", '1');
SalesLines.Filter.SetFilter(Type, '2');
SalesLines.Filter.SetFilter("No.", 'FCOM | FJOB | FRES | FLIFT');
SalesLines.First().AssertEquals.False ;
No luck. How can I assert that the record count is zero?
Thanks
Mark
Answers
RIS Plus, LLC
Thanks for suggestion. no luck. Only methods i have are these:
https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/testpart/testpart-data-type