Skip to content

@Tested(fullyInitialized = true) should look up for a loaded dependency class when type of dependency is an interface #191

@rliesenfeld

Description

@rliesenfeld

Currently, injected dependencies whose field declaration type is an interface are ignored when using "fullyInitialized = true" and there is no matching @Injectable.

To support such dependencies, we can try and find an already loaded class which implements the interface, in order for it to be instantiated. If more than one such class is found, however, the dependency would still be left null. This way, test code can choose which implementation class to use by simply ensuring the class is loaded by the JVM.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions