use of org.xwiki.component.internal.ContextComponentManagerProvider in project xwiki-platform by xwiki.
the class ComponentScriptServiceTest method configure.
@Before
public void configure() throws Exception {
this.dab = this.mocker.getInstance(DocumentAccessBridge.class);
this.contextComponentManager = this.mocker.registerMockComponent(ComponentManager.class, "context");
Provider<ComponentManager> contextComponentManagerProvider = this.mocker.registerMockComponent(new DefaultParameterizedType(null, Provider.class, ComponentManager.class), "context");
when(contextComponentManagerProvider.get()).thenReturn(this.contextComponentManager);
this.contextrootComponentManager = this.mocker.registerMockComponent(ComponentManager.class, "context/root");
Provider<ComponentManager> contextrootComponentManagerProvider = this.mocker.registerMockComponent(new DefaultParameterizedType(null, Provider.class, ComponentManager.class), "context/root");
when(contextrootComponentManagerProvider.get()).thenReturn(this.contextrootComponentManager);
this.rootComponentManager = this.mocker.registerMockComponent(ComponentManager.class, "root");
this.componentManagerManager = this.mocker.getInstance(ComponentManagerManager.class);
when(this.componentManagerManager.getComponentManager(null, false)).thenReturn(this.rootComponentManager);
this.execution = this.mocker.getInstance(Execution.class);
}
Aggregations