How to register a project or application component during a test?

I'd like to register a project component during a test, so project.getComponent(x.class) returns my object. How can I do this? How can I do this for Application as well?

0
Avatar
Permanently deleted user

Have you tried:

((ComponentManagerImpl)myModule).registerComponent(componentInterface, componentClass)

I haven't, but maybe it works......

0

请先登录再写评论。