JUnit runners don't handle @Before nor @After
Using @RunWith(GradleSamplesRunner::class) or @RunWith(SamplesRunner::class)
Expected Behavior
@Before and @After functions to be invoked properly
Current Behavior
@Before and @After functions silently ignored
Context
I wanted to skip some samples under certain conditions in a @Before function using JUnit Assume. I didn't find a satisfying way so far.
@BeforeClass and @AfterClass are already handled by the parent ParentRunner.
FWIW @Before and @After are handled in JUnit's BlockJUnit4ClassRunner.
@Rule are also affected by this.
@big-guy How so?
@marcphilipp since we don't use BlockJUnit4ClassRunner, @Rule's are also ignored.
Right, @ClassRule should work, though.