I’d like to create a BaseDAOTest.cfc for testing our DAO objects. These would be integration tests (dependency on the database), not unit tests so I feel it’s appropriate for them to be fully wired together rather than trying to isolate the dependencies. I.E. I want the DAO under test to be wired with the datasource objects as configured in the ColdBox application.
If this is a bad idea, this is a good time to say so.
So in my BaseDAO test I’m creating an Injector and initializing it with our application Binder configuration. This let’s the Injector find the DAO object to create it. However, I’m now getting an error about CacheBox being invalid when I attempt to create my DAO by calling Injector.autowire().
I thought to overcome this by passing the coldbox argument to the Injector initialization, however I’m not sure what value is supposed to be. Comments in the injector just describe it as a “ColdBox Link”. What value should I pass in?