Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Testsuite PoC - Injection framework should pass class type to suppliers #30611

@stianst

Description

@stianst

A PageSupplier is able to create different instances of Pages, but needs to know what the type of the class being injected into to know which to use. For example

@TestPage
RegistrationPage registrationPage

@TestPage
WelcomePage welcomePage

Supplier would be something like:

InstanceWrapper<T, S> getValue(Registry registry, S annotation, Class<? extends T> type);

This would in turn mean that the page supplier would create multiple instances, and the registry would select the correct one based on the class type. The registry would use the injected class type as an instance reference.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions