Overview
IsTestMethod and IsTestTemplateMethod currently validate that @Test and @TestTemplate methods have a void return type; however, IsTestFactoryMethod only validates that @TestFactory methods do not have a void return type. Consequently, @TestFactory return types are not validated during the discovery phase.
On the other hand, @TestFactory return types are in fact validated during the execution phase, but this is late and inconsistent with the behavior for all other types of testable methods.
Related Issues
Deliverables
Overview
IsTestMethodandIsTestTemplateMethodcurrently validate that@Testand@TestTemplatemethods have avoidreturn type; however,IsTestFactoryMethodonly validates that@TestFactorymethods do not have avoidreturn type. Consequently,@TestFactoryreturn types are not validated during the discovery phase.On the other hand,
@TestFactoryreturn types are in fact validated during the execution phase, but this is late and inconsistent with the behavior for all other types of testable methods.Related Issues
Deliverables
@TestFactorymethod return type validation fromTestFactoryTestDescriptortoIsTestFactoryMethod.@Disabledtests inIsTestFactoryMethodTests.