I want to use the TestInsight.DUnitX with guard (Spring4D) but I get message 'No assertions were made during the test'
Is it possible to use the guard class in place of the assert?
I want to use the TestInsight.DUnitX with guard (Spring4D) but I get message 'No assertions were made during the test'
Is it possible to use the guard class in place of the assert?
Copyright © 2021 Jogjafile Inc.
Spring.Guardhas nothing to do withAssertfrom DUnitX.If you have unit tests that just pass because
Guard(or basically any possible exception throwing code) did not raise then you need to satisfy DUnitX (or more precisely TestInsight) by simply callingAssert.Passin your unit tests which basically tells it "I did not forget any checks - it's all fine".See also https://stackoverflow.com/a/42073187/587106