Hello,
I have a problem with a unit test (extending
AbstractBridgedComponentTestCase) of a component.
That component is injected with several xwiki components (QueryManager,
Logger, ExecutionContext ...) that get properly automatically mocked by the
test setup. I inherit from xwiki-commons-pom 4.3.
But the following:
@Inject
LoggerManager loggerManager;
... fails to be mocked by the test, or to be available from the embeddable
component manager :
...
Caused by: org.xwiki.component.manager.ComponentLookupException: Can't find
descriptor for the component [role = [interface
org.xwiki.logging.LoggerManager] hint = [default]]
at
org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:355)
at
org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:161)
...
I checked it's a org.xwiki.logging.LoggerManager, has a @Role, everything
seems ok ...
Any help welcome,
BR,
Jeremie