Skip to content

First attempt at generic-izing support for child method classes

Choose a tag to compare

@sbabcoc sbabcoc released this 17 Jul 20:32
· 214 commits to master since this release

This is a first stab at replacing the hardcoded support for the native JUnit method class (FrameworkMethod) with generic support for whatever method class happens to be running. As I discovered when applying this release to an actual use case (support for JUnit Cucumber), I didn't go far enough. Here's what changed in this release:

  • AtomicTest - Replace hardcoded support for FrameworkMethod with generic type parameter.
  • LifecycleHooks - Add type parameter to AtomicTest references. Replace custom reflection-based method invocation with Apache Commons MethodUtils call.
  • RunAnnouncer - Add type parameter to this class, and to AtomicTest and RunWatcher references.
  • RunChild - Expand scope of AtomicTest creation to ensure that clients are able to acquire test objects related to non-native runners.
  • RunWatcher - Add type parameter to this interface and to AtomicTest references.