use of com.xpn.xwiki.plugin.tag.TagPluginApi in project xwiki-platform by xwiki.
the class LiveTableResultsTest method setUp.
@Before
@SuppressWarnings("deprecation")
public void setUp() throws Exception {
setOutputSyntax(Syntax.PLAIN_1_0);
request.put("outputSyntax", "plain");
request.put("xpage", "plain");
oldcore.getXWikiContext().setAction("get");
queryService = mock(QueryManagerScriptService.class);
oldcore.getMocker().registerComponent(ScriptService.class, "query", queryService);
modelService = mock(ModelScriptService.class);
oldcore.getMocker().registerComponent(ScriptService.class, "model", modelService);
TagPluginApi tagPluginApi = mock(TagPluginApi.class);
doReturn(tagPluginApi).when(oldcore.getSpyXWiki()).getPluginApi(eq("tag"), any(XWikiContext.class));
registerVelocityTool("stringtool", new StringUtils());
registerVelocityTool("mathtool", new MathTool());
registerVelocityTool("regextool", new RegexTool());
registerVelocityTool("numbertool", new NumberTool());
loadPage(new DocumentReference("xwiki", "XWiki", "LiveTableResultsMacros"));
}
Aggregations