Model Object Testing
coldbox create model-test path=models.UserService methods=save,list,search --open/**
* The base model test case will use the 'model' annotation as the instantiation path
* and then create it, prepare it for mocking and then place it in the variables scope as 'model'. It is your
* responsibility to update the model annotation instantiation path and init your model.
*/
component extends="coldbox.system.testing.BaseModelTest" model="UserService"{
/*********************************** LIFE CYCLE Methods ***********************************/
function beforeAll(){
// setup the model
super.setup();
// init the model object
model.init();
}
function afterAll(){
}
/*********************************** BDD SUITES ***********************************/
function run(){
describe( "UserService Suite", function(){
it( "should save", function(){
});
it( "should search", function(){
});
it( "should list", function(){
});
});
}
}Was this helpful?