use of com.xpn.xwiki.store.XWikiVersioningStoreInterface in project xwiki-platform by xwiki.
the class XWikiMockitoTest method setUp.
@Before
public void setUp() throws Exception {
this.mocker.registerMockComponent(ResourceReferenceManager.class);
this.mocker.registerMockComponent(Environment.class);
this.mocker.registerMockComponent(ObservationManager.class);
this.mocker.registerMockComponent(ConfigurationSource.class, XWikiCfgConfigurationSource.ROLEHINT);
this.mocker.registerMockComponent(StoreConfiguration.class);
this.mocker.registerMockComponent(WikiDescriptorManager.class);
Utils.setComponentManager(mocker);
xwiki = new XWiki();
this.context.setWiki(this.xwiki);
this.storeMock = mock(XWikiStoreInterface.class);
xwiki.setStore(storeMock);
XWikiVersioningStoreInterface versioningStore = mock(XWikiVersioningStoreInterface.class);
xwiki.setVersioningStore(versioningStore);
this.documentRevisionProvider = this.mocker.registerMockComponent(DocumentRevisionProvider.class);
this.xwikiCfgConfigurationSource = this.mocker.registerMockComponent(ConfigurationSource.class, "xwikicfg");
Execution execution = this.mocker.getInstance(Execution.class);
ExecutionContext executionContext = new ExecutionContext();
execution.setContext(executionContext);
}
Aggregations