Skip to content

Move @TestFactory return type validation to IsTestFactoryMethod #949

@sbrannen

Description

@sbrannen

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

  • Move @TestFactory method return type validation from TestFactoryTestDescriptor to IsTestFactoryMethod.
  • Enable @Disabled tests in IsTestFactoryMethodTests.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions