Skip to content

Improve diagnostics for private @RegisterExtension fields #1912

@sbrannen

Description

@sbrannen

Overview

Currently, if a @RegisterExtension field is declared as private, JUnit Jupiter silently ignores it. Consequently, it can be difficult for a user to determine why the extension "is not working".

Since the mere presence of @RegisterExtension should signal that the user intended for an extension to be registered (see #1908), improper configuration should result in an error instead of being silently ignored.

Related Issues

Deliverables

  • Fail the test method or test class if a @RegisterExtension field is private.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions