use of org.apache.wiki.TestEngine in project jspwiki by apache.
the class IfPluginTest method setUp.
@Before
public void setUp() throws Exception {
Properties props = TestEngine.getTestProperties();
testEngine = new TestEngine(props);
}
use of org.apache.wiki.TestEngine in project jspwiki by apache.
the class PageViewPluginTest method setUp.
@Before
public void setUp() throws Exception {
CacheManager.getInstance().removeAllCaches();
testEngine = new TestEngine(props);
// create pages that should be counted
testEngine.saveText("TestPage01", "this is test page 01 [{PageViewPlugin}]");
testEngine.saveText("TestPage02", "this is test page 02 [{PageViewPlugin}]");
manager = new DefaultPluginManager(testEngine, props);
}
use of org.apache.wiki.TestEngine in project jspwiki by apache.
the class RecentChangesPluginTest method setUp.
@Before
public void setUp() throws Exception {
CacheManager.getInstance().removeAllCaches();
testEngine = new TestEngine(props);
testEngine.saveText("TestPage01", "Some Text for testing 01");
testEngine.saveText("TestPage02", "Some Text for testing 02");
testEngine.saveText("TestPage03", "Some Text for testing 03");
testEngine.saveText("TestPage04", "Some Text for testing 04");
manager = new DefaultPluginManager(testEngine, props);
}
use of org.apache.wiki.TestEngine in project jspwiki by apache.
the class ReferringPagesPluginTest method setUp.
@Before
public void setUp() throws Exception {
props.setProperty("jspwiki.breakTitleWithSpaces", "false");
engine = new TestEngine(props);
engine.saveText("TestPage", "Reference to [Foobar].");
engine.saveText("Foobar", "Reference to [TestPage].");
engine.saveText("Foobar2", "Reference to [TestPage].");
engine.saveText("Foobar3", "Reference to [TestPage].");
engine.saveText("Foobar4", "Reference to [TestPage].");
engine.saveText("Foobar5", "Reference to [TestPage].");
engine.saveText("Foobar6", "Reference to [TestPage].");
engine.saveText("Foobar7", "Reference to [TestPage].");
context = new WikiContext(engine, engine.newHttpRequest(), new WikiPage(engine, "TestPage"));
manager = new DefaultPluginManager(engine, props);
}
use of org.apache.wiki.TestEngine in project jspwiki by apache.
the class ShortViewURLConstructorTest method getConstructor.
private URLConstructor getConstructor(String prefix) throws WikiException {
if (prefix != null)
props.setProperty(ShortViewURLConstructor.PROP_PREFIX, prefix);
testEngine = new TestEngine(props);
URLConstructor constr = new ShortViewURLConstructor();
constr.initialize(testEngine, props);
return constr;
}
Aggregations