Add support for Google's TestParameterInjector
·
13 commits
to master
since this release
In this release, I added support for Google's TestParameterInjector. This was a bit challenging, due to a couple of implementation choices made by Google.
- TestParameterInjector doesn't use the standard
createTest(FrameworkMethod)method to create instances of test classes. I had to find a different point to intercept the flow of execution to fire the "testObjectCreated" notification and create the associated JUnit framework object mappings. - TestParameterInjector bypasses the standard
runLeaf(Statement, Description, RunNotifier)method to invoke "atomic" tests. This would typically create a new EachTestNotifier object, which I used to create a tracking object for the "atomic" test and create more object mappings. I had to find a different point to perform these operations as well.
Addition of this new feature was prompted by an issue reported by @idan-at regarding failures associated with the use of Apache's MethodUtils class to invoke methods by name. I switched to a basic internal implementation, which always selects the first compatible method it finds in the inheritance hierarchy.