Package org.apache.wicket.util.tester

Examples of org.apache.wicket.util.tester.WicketTester.startPage()


    };

    tester.getApplication().getSecuritySettings().setAuthorizationStrategy(
        authorizationStrategy);

    tester.startPage(RedirectPage.class);
    tester.assertRenderedPage(LoginPage.class);
  }
}
View Full Code Here


   */
  public void testSignIn2()
  {
    WicketTester tester = new WicketTester(new SignIn2Application());

    tester.startPage(Home.class);

    tester.assertRenderedPage(SignIn2.class);

    FormTester formTester = tester.newFormTester("signInPanel:signInForm");
    formTester.setValue("username", "wicket");
View Full Code Here

      {
        assertEquals("wicket", cookie.getValue());
      }
    }

    tester.startPage(SignOut.class);
    tester.assertRenderedPage(SignOut.class);

    tester.startPage(Home.class);
    tester.assertRenderedPage(SignIn2.class);
  }
View Full Code Here

    }

    tester.startPage(SignOut.class);
    tester.assertRenderedPage(SignOut.class);

    tester.startPage(Home.class);
    tester.assertRenderedPage(SignIn2.class);
  }
}
View Full Code Here

  public void test_1() throws Exception
  {
    GuestBookApplication book = new GuestBookApplication();
    WicketTester tester = new WicketTester(book);

    tester.startPage(GuestBook.class);
    tester.assertContains("Wicket Examples - guestbook");

    // check if the list of comments is empty
    tester.assertListView("comments", new ArrayList());
    tester.assertComponent("commentForm", Form.class);
View Full Code Here

    };

    tester.getApplication().getSecuritySettings().setAuthorizationStrategy(
      authorizationStrategy);

    tester.startPage(RedirectPage.class);
    tester.assertRenderedPage(LoginPage.class);
  }
}
View Full Code Here

    final String filename) throws Exception
  {
    // Default Config: parent first header render strategy
    log.error("=== PARENT first header render strategy ===");
    WicketTester tester = new WicketTester();
    tester.startPage(pageClass);
    tester.assertRenderedPage(pageClass);
    tester.assertResultPage(getClass(), filename);

    // child first header render strategy
    log.error("=== CHILD first header render strategy ===");
View Full Code Here

    log.error("=== CHILD first header render strategy ===");
    System.setProperty("Wicket_HeaderRenderStrategy",
      ChildFirstHeaderRenderStrategy.class.getName());
    // tester.getApplication().getApplicationSettings().setHeaderRenderStrategy(
    // new ChildFirstHeaderRenderStrategy());
    tester.startPage(pageClass);
    tester.assertRenderedPage(pageClass);
    tester.assertResultPage(getClass(), filename + "_2");
    System.setProperty("Wicket_HeaderRenderStrategy", "");
  }
}
View Full Code Here

   */
  public void testHangmanSuccessWebGame()
  {
    WicketTester tester = new WicketTester(new HangmanApplication());

    tester.startPage(Home.class, new PageParameters("word=hangman"));
    tester.assertComponent("start", Link.class);
    tester.assertContains("Wicket Examples - hangman");
    tester.clickLink("start");
    tester.assertLabel("guessesRemaining", "5");
    clickLetter(tester, 'f');
View Full Code Here

   */
  public void testHangmanFailureWebGame()
  {
    WicketTester tester = new WicketTester(new HangmanApplication());

    tester.startPage(Home.class, new PageParameters("word=hangman"));
    tester.assertComponent("start", Link.class);
    tester.assertContains("Wicket Examples - hangman");
    tester.clickLink("start");
    tester.assertLabel("guessesRemaining", "5");
    clickLetter(tester, 'f');
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.