Skipping Tests and Suites
component displayName="TestBox xUnit suite" skip="testEnv"{
function setup(){
application.wirebox = new coldbox.system.ioc.Injector();
structClear( request );
}
function teardown(){
structDelete( application, "wirebox" );
structClear( request );
}
function testThrows() skip="true"{
$assert.throws(function(){
var hello = application.wirebox.getInstance( "myINvalidService" ).run();
});
}
function testNotThrows(){
$assert.notThrows(function(){
var hello = application.wirebox.getInstance( "MyValidService" ).run();;
});
}
private boolean function testEnv(){
return ( structKeyExists( request, "env") && request.env == "stg" ? true : false );
}
}Last updated
Was this helpful?