use of org.xwiki.test.annotation.AfterComponent in project xwiki-platform by xwiki.
the class UserAndGroupDocumentReferenceResolverTest method afterComponent.
@AfterComponent
public void afterComponent() throws Exception {
EntityReferenceProvider provider = this.mocker.registerMockComponent(EntityReferenceProvider.class);
when(provider.getDefaultReference(EntityType.WIKI)).thenReturn(new WikiReference("defaultwiki"));
}
use of org.xwiki.test.annotation.AfterComponent in project xwiki-platform by xwiki.
the class PageTest method configureComponentsBeforeOldcoreRuleForPageTest.
/**
* Set up of Components after the Components declared in {@link org.xwiki.test.annotation.ComponentList} have been
* handled but before {@link MockitoOldcoreRule#before(Class)} has been called (i.e. before it has created Mocks
* and configured Components).
*
* @throws Exception in case of errors
*/
@AfterComponent
public void configureComponentsBeforeOldcoreRuleForPageTest() throws Exception {
// Configure the Execution Context
ExecutionContext ec = new ExecutionContext();
mocker.<Execution>getInstance(Execution.class).setContext(ec);
}
use of org.xwiki.test.annotation.AfterComponent in project xwiki-platform by xwiki.
the class CurrentUserAndGroupDocumentReferenceResolverTest method afterComponent.
@AfterComponent
public void afterComponent() throws Exception {
EntityReferenceProvider provider = this.mocker.registerMockComponent(EntityReferenceProvider.class, "current");
when(provider.getDefaultReference(EntityType.WIKI)).thenReturn(new WikiReference("currentwiki"));
}
Aggregations