Examples of assertRenderedPage()


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

    tester.startPage(new TestPage(constructorsCalls));

    assertEquals(1, constructorsCalls.get());

    tester.assertRenderedPage(TestPage.class);

    assertEquals(1, constructorsCalls.get());
  }

  private static class TestPage extends WebPage implements IMarkupResourceStreamProvider
View Full Code Here

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

    WicketTester tester = new WicketTester(new SignIn2Application());
    try
    {
      tester.startPage(Home.class);

      tester.assertRenderedPage(SignIn2.class);

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

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

      FormTester formTester = tester.newFormTester("signInPanel:signInForm");
      formTester.setValue("username", "wicket");
      formTester.setValue("password", "wicket");
      formTester.setValue("rememberMeContainer:rememberMe", "true");
      formTester.submit();
      tester.assertRenderedPage(Home.class);

      // a) With wicket submitting a form will result in a temporary redirect,
      // with the redirect setting the Cookie.
      // b) jWebUnits Cookie test methods are all using the http response
      // object only
View Full Code Here

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

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

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

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

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

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

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

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

    MockHttpServletResponse errorPageResponse = tester.getLastResponse();
    assertEquals(500, errorPageResponse.getStatus());

    // assert that the original page is still the last rendered one
    tester.assertRenderedPage(InternalErrorCallsAjaxOnFailurePage.class);
    tester.destroy();
  }
}
View Full Code Here

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

    tester.getApplication()
      .getSecuritySettings()
      .setAuthorizationStrategy(
        new RoleAuthorizationStrategy(new UserRolesAuthorizer("ADMIN")));
    tester.startPage(AdminPage.class);
    tester.assertRenderedPage(AdminPage.class);
  }

  /**
   * @throws Exception
   */
 
View Full Code Here

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

    assertEquals(500, errorPageResponse.getStatus());
    assertTrue(errorPageResponse.getDocument().contains(
      InternalErrorCallsAjaxOnFailurePage.ERROR_MESSAGE));

    // assert the page with detailed error explanation is rendered
    tester.assertRenderedPage(ExceptionErrorPage.class);
  }


  /**
   * Setup {@link AjaxErrorStrategy#INVOKE_FAILURE_HANDLER} so Wicket will not redirect to the
View Full Code Here

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

  private <T extends Page> void executeCombinedTest(final Class<T> pageClass,
    final String filename) throws Exception
  {
    WicketTester tester = new WicketTester();
    tester.startPage(pageClass);
    tester.assertRenderedPage(pageClass);
    tester.assertResultPage(getClass(), filename + "_2");
    System.setProperty("Wicket_HeaderRenderStrategy", "");
  }

  /**
 
View Full Code Here

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

    MockHttpServletResponse errorPageResponse = tester.getLastResponse();
    assertEquals(500, errorPageResponse.getStatus());

    // assert that the original page is still the last rendered one
    tester.assertRenderedPage(InternalErrorCallsAjaxOnFailurePage.class);
  }
}
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.