Package org.apache.wicket.util.tester

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


    }
    assertNotNull(container.getSubject());
    WicketTester mock = new WicketTester();
    container.logoff(ctx);
    mock.processRequest();
    mock.destroy();
    assertNull(container.getSubject());
  }

  /**
   * Test method for multi login.
View Full Code Here


      assertTrue(container.isClassAuthenticated(VerySecurePage.class));
      assertTrue(container.getSubject()
        .getPrincipals()
        .contains(new SimplePrincipal("admin")));
      mock.processRequest();
      mock.destroy();
    }
    catch (LoginException e)
    {
      log.error(e.getMessage(), e);
      fail(e.getMessage());
View Full Code Here

    try
    {
      WicketTester mock = new WicketTester();
      container.login(new myContext());
      mock.processRequest();
      mock.destroy();
    }
    catch (LoginException e)
    {
      log.error(e.getMessage(), e);
      fail(e.getMessage());
View Full Code Here

    {
      WicketTester mock = new WicketTester();
      container.login(new myContext());
      fail("Should not be able to login");
      mock.processRequest();
      mock.destroy();
    }
    catch (LoginException e)
    {
    }
    WicketTester mock = new WicketTester();
View Full Code Here

    {
    }
    WicketTester mock = new WicketTester();
    container.logoff(new myContext());
    mock.processRequest();
    mock.destroy();
    try
    {
      mock = new WicketTester();
      container.login(new myContext());
      mock.processRequest();
View Full Code Here

    try
    {
      mock = new WicketTester();
      container.login(new myContext());
      mock.processRequest();
      mock.destroy();
    }
    catch (LoginException e)
    {
      log.error(e.getMessage(), e);
      fail(e.getMessage());
View Full Code Here

      tester.assertContains("€");
      return tester.getLastResponseAsString();
    }
    finally
    {
      tester.destroy();
    }
  }
}
View Full Code Here

    application.getServletRequest().setRequestToComponent(link);
    application.processRequestCycle();
    document = application.getServletResponse().getDocument();
    DiffUtil.validatePage(document, this.getClass(), "PagedTableNavigatorExpectedResult_8.html", true);

    application.destroy();
  }
}
View Full Code Here

    WicketTester tester = new WicketTester();
    WebApplication app = tester.getApplication();
    IStringResourceLoader loader = new ClassStringResourceLoader(app.getClass());
    Assert.assertNull("Unknown resource should return null", loader.loadStringResource(component.getClass(),
        "test.string", Locale.getDefault(), null));
    tester.destroy();
  }
}
View Full Code Here

    application.setupRequestAndResponse();
    application.getServletRequest().setRequestToComponent(link);
    application.processRequestCycle();
    document = application.getServletResponse().getDocument();
    DiffUtil.validatePage(document, this.getClass(), "PagedTablePageExpectedResult.html", true);
    application.destroy();
  }

  /**
   * Validates page 1 of paged table.
   * @param document The document
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.