本文整理匯總了Java中org.apache.wicket.util.tester.WicketTester.startPage方法的典型用法代碼示例。如果您正苦於以下問題:Java WicketTester.startPage方法的具體用法?Java WicketTester.startPage怎麽用?Java WicketTester.startPage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.wicket.util.tester.WicketTester
的用法示例。
在下文中一共展示了WicketTester.startPage方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setUp
import org.apache.wicket.util.tester.WicketTester; //導入方法依賴的package包/類
public void setUp() throws Exception{
super.setUp();
Persistor.useTestEnvironment();
attributes.add(baseAttribute);
attributes.add(depAttribute);
AttributeTypeTree attributeTree = new AttributeTypeTree(attributes);
eventType = new EapEventType("TestType", attributeTree);
ArrayList<EapEventType> eventTypes = new ArrayList<>();
eventTypes.add(eventType);
EapEventType.save(eventTypes);
tester = new WicketTester(new UNICORNApplication());
tester.startPage(GeneratorPage.class);
tester.startComponentInPage(new DependenciesPanel("dependenciesPanel" , new GeneratorPage()));
// get form
List<Form> list = new ArrayList<>();
Page x = tester.getLastRenderedPage();
for (Component form : x.visitChildren(Form.class)) {
list.add((Form) form);
}
formPath = list.get(0).getPageRelativePath();
listViewPath = formPath + ":dependenciesContainer:dependenciesListview";
}
示例2: setUp
import org.apache.wicket.util.tester.WicketTester; //導入方法依賴的package包/類
@Override
protected void setUp() throws Exception {
super.setUp();
tester = new WicketTester(new OntopolyApplication());
tester.startPage(StartPage.class);
tester.assertNoErrorMessage();
}
示例3: testAddResourcesIfAutoAppendIsUsed
import org.apache.wicket.util.tester.WicketTester; //導入方法依賴的package包/類
@Test
public void testAddResourcesIfAutoAppendIsUsed() {
WicketTester tester = new WicketTester(createWebApp(customSettings, true));
tester.startPage(MockHomePage.class);
TagTester jsResource = TagTester.createTagByAttribute(tester.getLastResponseAsString(), "src",
String.format(DefaultLeafletSettings.JS_CDN_PATTERN, customSettings.getVersion()));
assertThat(jsResource).isNotNull();
assertThat(jsResource.getName()).isEqualTo("script");
TagTester cssResource = TagTester.createTagByAttribute(tester.getLastResponseAsString(), "href",
String.format(DefaultLeafletSettings.CSS_CDN_PATTERN, customSettings.getVersion()));
assertThat(cssResource).isNotNull();
assertThat(cssResource.getName()).isEqualTo("link");
}
示例4: testDontAddResourceIfAutoAppendIsntUsed
import org.apache.wicket.util.tester.WicketTester; //導入方法依賴的package包/類
@Test
public void testDontAddResourceIfAutoAppendIsntUsed() {
DefaultLeafletSettings settings = new DefaultLeafletSettings();
WicketTester tester = new WicketTester(createWebApp(settings, true));
tester.startPage(MockHomePage.class);
tester.assertContainsNot("<script>");
tester.assertContainsNot("<link>");
}
示例5: test001BasicRender
import org.apache.wicket.util.tester.WicketTester; //導入方法依賴的package包/類
@Test
public void test001BasicRender() {
WicketTester tester = new WicketTester();
PageLogin page = tester.startPage(PageLogin.class);
tester.assertRenderedPage(PageUser.class);
}
示例6: testBasicRender
import org.apache.wicket.util.tester.WicketTester; //導入方法依賴的package包/類
@Test(enabled = false)
public void testBasicRender() {
WicketTester tester = new WicketTester();
PageUser page = tester.startPage(PageUser.class);
tester.assertRenderedPage(PageUser.class);
}
示例7: testBasicRender
import org.apache.wicket.util.tester.WicketTester; //導入方法依賴的package包/類
@Test
public void testBasicRender() {
WicketTester tester = new WicketTester();
tester.startPage(page);
tester.assertRenderedPage(page);
}
示例8: testApplication
import org.apache.wicket.util.tester.WicketTester; //導入方法依賴的package包/類
@Test
public void testApplication() {
WicketTester wicketTester = testService.getWicketTester();
wicketTester.startPage(Homepage.class);
wicketTester.assertRenderedPage(Homepage.class);
}
示例9: testMountedPage
import org.apache.wicket.util.tester.WicketTester; //導入方法依賴的package包/類
@Test
public void testMountedPage() {
WicketTester wicketTester = testService.getWicketTester();
wicketTester.startPage(MountedPage.class);
wicketTester.assertRenderedPage(MountedPage.class);
}
示例10: testHighscores
import org.apache.wicket.util.tester.WicketTester; //導入方法依賴的package包/類
@Test
public void testHighscores() {
WicketTester wicketTester = testService.getWicketTester();
wicketTester.startPage(HighscoresPage.class);
wicketTester.assertRenderedPage(HighscoresPage.class);
}
示例11: testUsers
import org.apache.wicket.util.tester.WicketTester; //導入方法依賴的package包/類
@Test
public void testUsers() {
WicketTester wicketTester = testService.getWicketTester();
wicketTester.startPage(UsersPage.class);
wicketTester.assertRenderedPage(UsersPage.class);
}