Status Quo
In the JUnit Jupiter programming model it is currently not forbidden for @Test and lifecycle methods (i.e., @BeforeEach, @BeforeAll, etc.) to have a return value, even if it's assumed that no one declares anything other than void as a return type for such methods.
For example, the following currently execute.
@Test
int test() {
fail("Boom!");
return 42;
}
@BeforeEach
int before() {
fail("Boom!");
return 42;
}
Related Issues
Deliverables
Status Quo
In the JUnit Jupiter programming model it is currently not forbidden for
@Testand lifecycle methods (i.e.,@BeforeEach,@BeforeAll, etc.) to have a return value, even if it's assumed that no one declares anything other thanvoidas a return type for such methods.For example, the following currently execute.
Related Issues
Deliverables