use of org.xwiki.security.authorization.testwikis.internal.parser.DefaultTestDefinitionParser in project xwiki-platform by xwiki.
the class AbstractAuthorizationTestCase method initialiseWikiMock.
/**
* Initialize the test by loading wikis form XML.
* @param filename the filename without extension
* @return the test wikis, also available using {@link #testDefinition}
* @throws Exception on error.
*/
protected TestDefinition initialiseWikiMock(String filename) throws Exception {
TestDefinitionParser parser = new DefaultTestDefinitionParser();
EntityReferenceResolver<String> resolver = componentManager.getInstance(EntityReferenceResolver.TYPE_STRING);
EntityReferenceSerializer<String> serializer = componentManager.getInstance(EntityReferenceSerializer.TYPE_STRING);
testDefinition = parser.parse("testwikis" + File.separator + filename + ".xml", resolver, serializer);
return testDefinition;
}
Aggregations