[coldbox-3.6.0] BaseTestCase support for 'around advice' in addition to setup and teardown?

Recently one of our developers attended a CF event where Luis was the instructor. He recommended for unit testing things where cfquery is involved (like in a DAO object) to run a transaction around the test and rollback at the end (I’m using cffinally so even if the test is malformed as I’m developing it the testing db will still stay squeaky clean). This works well, but then I thought about wouldn’t it be nice to put the transaction stuff in the setup and teardown so I didn’t have to manually include it in every function in my test case file (we happen to have one test file per cfc we’re testing and one function in that file for each function we’re testing in the cfc, so the setup and teardown would happen for each individual test).

I looked high and low to see if the CB BaseTestCase or the MXUnit test case it extends supported an ‘around’ interception point for running the tests, since a cf transaction has to be contained entirely inside one function (no splitting the start and end between the setup and teardown functions). Does anyone know if this is supported. If not, would it be possible to add support in CB even if MXUnit’s test case doesn’t support it natively?


If you are mocking these DB calls, transaction will not be needed.