Skip to content

Move @TestFactory return type validation to IsTestFactoryMethod #949

Description

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions