Skip to content

Add value attribute alias to @MockitoBean and @MockitoSpyBean #33680

@sbrannen

Description

@sbrannen

@TestBean currently supports name and value aliases; however, @MockitoBean and @MockitoSpyBean only support a name attribute which requires users to type @MockitoBean(name = "userService") instead of simply @MockitoBean("userService").

To improve the user experience for common cases, we should introduce new value attributes in @MockitoBean and @MockitoSpyBean as aliases for the existing name attributes.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions