當前位置: 首頁>>代碼示例>>Java>>正文


Java WicketTester.startPage方法代碼示例

本文整理匯總了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";
}
 
開發者ID:bptlab,項目名稱:Unicorn,代碼行數:23,代碼來源:DependenciesPanelTest.java

示例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();
}
 
開發者ID:ontopia,項目名稱:ontopia,代碼行數:8,代碼來源:StartPageTest.java

示例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");
}
 
開發者ID:DrunkenPandaFans,項目名稱:wicket-leaflet,代碼行數:16,代碼來源:LeafletTest.java

示例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>");
}
 
開發者ID:DrunkenPandaFans,項目名稱:wicket-leaflet,代碼行數:10,代碼來源:LeafletTest.java

示例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);
}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:7,代碼來源:PageLoginTest.java

示例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);
}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:7,代碼來源:PageUserTest.java

示例7: testBasicRender

import org.apache.wicket.util.tester.WicketTester; //導入方法依賴的package包/類
@Test
public void testBasicRender() {
    WicketTester tester = new WicketTester();
    tester.startPage(page);
    tester.assertRenderedPage(page);
}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:7,代碼來源:PageTest.java

示例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);
}
 
開發者ID:Pentadrago,項目名稱:spring-boot-example-wicket,代碼行數:7,代碼來源:WicketWebApplicationTest.java

示例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);
}
 
開發者ID:Pentadrago,項目名稱:spring-boot-example-wicket,代碼行數:7,代碼來源:WicketWebApplicationTest.java

示例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);
}
 
開發者ID:thombergs,項目名稱:ikenga-web,代碼行數:7,代碼來源:WicketWebApplicationTest.java

示例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);
}
 
開發者ID:thombergs,項目名稱:ikenga-web,代碼行數:7,代碼來源:WicketWebApplicationTest.java


注:本文中的org.apache.wicket.util.tester.WicketTester.startPage方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。