marklogic-community / marklogic-unit-test

Automated testing for MarkLogic
https://marklogic-community.github.io/marklogic-unit-test/
Other
13 stars 25 forks source link

Use fail() instead of calling assert-true with a false value #108

Closed jamesagardner closed 1 year ago

jamesagardner commented 5 years ago

Replace references in the code that call assert-true where the value is fn:false(), if the idea is to cause the test to fail, we should instead use the fail function.

Here are some examples that should be replaced: https://github.com/marklogic-community/marklogic-unit-test/blob/63a8aa4a36d1d2576469a8972ec91960b204a980/marklogic-unit-test-modules/src/main/ml-modules/root/test/test-helper.xqy#L581

https://github.com/marklogic-community/marklogic-unit-test/blob/63a8aa4a36d1d2576469a8972ec91960b204a980/marklogic-unit-test-modules/src/main/ml-modules/root/test/test-helper.xqy#L595

https://github.com/marklogic-community/marklogic-unit-test/blob/63a8aa4a36d1d2576469a8972ec91960b204a980/marklogic-unit-test-modules/src/main/ml-modules/root/test/test-helper.xqy#L598

https://github.com/marklogic-community/marklogic-unit-test/blob/63a8aa4a36d1d2576469a8972ec91960b204a980/marklogic-unit-test-modules/src/main/ml-modules/root/test/test-helper.xqy#L605

https://github.com/marklogic-community/marklogic-unit-test/blob/63a8aa4a36d1d2576469a8972ec91960b204a980/marklogic-unit-test-modules/src/main/ml-modules/root/test/test-helper.xqy#L607

The fix should include tests that call assert-throws-error-with-message to ensure the above conditions continue to return the expected failure message.

rjrudin commented 1 year ago

DEVEXP-550.