When running unit tests, I force the binding for an interface to point to a mock implementation of it. (I override the normal annotation bindings.) Other test suites, should use the default bindings. The result is that the tests in the later suites are failing when run as a batch, but run fine when only the specific suite is run.
Is there a way to reset the bindings back to the way they were? My thought is:
1) in before, we grab the existing configurations that we are about to override.
2) Run the tests
3) in after, put the configurations back.
Unfortunately, there is no way to get the current configuration, only the actual instance to determine what was originally set there.
When running unit tests, I force the binding for an interface to point to a mock implementation of it. (I override the normal annotation bindings.) Other test suites, should use the default bindings. The result is that the tests in the later suites are failing when run as a batch, but run fine when only the specific suite is run. Is there a way to reset the bindings back to the way they were? My thought is: 1) in before, we grab the existing configurations that we are about to override.
2) Run the tests 3) in after, put the configurations back.
Unfortunately, there is no way to get the current configuration, only the actual instance to determine what was originally set there.