I have the following code…
private void function throwListOfErrors() {
if ( methodName.isTest() ) {
var errors = arrayToList( getErrors(), “|” );
request.errors = errors;
throw( message = errors );
}
}
If the methodName.isTest is false I cannot use
expect( Unit.throwListOfErrors() ).notToThrow();
as it throws an error from expectation.cfc
What is the recommended method. Basically if false then nothing happens. How do you test nothing?
Thank you in advance.