Skip to content

Change @TestConstructor.autowire attribute into an enum #23224

@philwebb

Description

@philwebb

I think it's possible that we might want to support different autowire modes with @TestConstructor in the future. Specifically, I think it would be nice if we could mix autowire with other extension mechanisms and have autowiring apply only when no other ParameterResolvers match.

I wonder if we should change autowire from a boolean to an enum so we can add more options in the future.

e.g.:

@TestConstructor(autowire=Autowire.ANNOTATED)
@TestConstructor(autowire=Autowire.ALL)
@TestConstructor(autowire=Autowire.REMAINING)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions