use of org.xwiki.bridge.DocumentAccessBridge in project xwiki-platform by xwiki.
the class AbstractRefactoringTestCase method registerComponents.
@Override
protected void registerComponents() throws Exception {
// Document Access Bridge Mock
final DocumentAccessBridge mockDocumentAccessBridge = this.mockery.mock(DocumentAccessBridge.class);
DefaultComponentDescriptor<DocumentAccessBridge> descriptorDAB = new DefaultComponentDescriptor<DocumentAccessBridge>();
descriptorDAB.setRoleType(DocumentAccessBridge.class);
getComponentManager().registerComponent(descriptorDAB, mockDocumentAccessBridge);
mockery.checking(new Expectations() {
{
allowing(mockDocumentAccessBridge).exists(with(any(String.class)));
will(returnValue(false));
}
});
this.docBridge = getComponentManager().getInstance(DocumentAccessBridge.class, "default");
this.xwikiParser = getComponentManager().getInstance(Parser.class, "xwiki/2.0");
}
Aggregations