Package org.apache.wicket.mock

Examples of org.apache.wicket.mock.MockApplication


   * @param homePage
   *            a home page <code>Class</code>
   */
  public <C extends Page> BaseWicketTester(final Class<C> homePage)
  {
    this(new MockApplication()
    {
      @Override
      public Class<? extends Page> getHomePage()
      {
        return homePage;
View Full Code Here


    TestWebSocketResource.ON_CONNECT_CALLED.set(false);
    TestWebSocketResource.ON_CLOSE_CALLED.set(false);
    ON_OUT_BINARY_CALLED.set(false);
    ON_OUT_TEXT_CALLED.set(false);

    WebApplication application = new MockApplication()
    {
      @Override
      protected void init()
      {
        super.init();
View Full Code Here

  /**
   * @return the application that should be used for the test
   */
  protected WebApplication newApplication()
  {
    return new MockApplication();
  }
View Full Code Here

public class DefaultExceptionMapperResourceBlockedDevModeTest extends WicketTestCase
{
  @Override
  protected WebApplication newApplication()
  {
    return new MockApplication()
    {
      @Override
      protected void init()
      {
        getExceptionSettings().setUnexpectedExceptionDisplay(
View Full Code Here

public class DefaultExceptionMapperResourceBlockedProdModeTest extends WicketTestCase
{
  @Override
  protected WebApplication newApplication()
  {
    return new MockApplication()
    {
      @Override
      protected void init()
      {
        getExceptionSettings().setUnexpectedExceptionDisplay(
View Full Code Here

  private final Class<? extends Page> LOGIN = LoginPage.class;

  @Override
  protected WebApplication newApplication()
  {
    return new MockApplication()
    {
      @Override
      public Class<? extends Page> getHomePage()
      {
        return HOME;
View Full Code Here

      {
        return customMarkupId;
      }
    };

    MockApplication application = new MockApplication()
    {
      @Override
      public IMarkupIdGenerator getMarkupIdGenerator()
      {
        return generator;
View Full Code Here

    FileOutputStream out = new FileOutputStream(tempFile);
    InputStream in = WebExternalResourceTest.class.getResourceAsStream("index.html");
    Streams.copy(in, out);
    in.close();
    out.close();
    tester = new WicketTester(new MockApplication(), tempDir.getPath());
    // We fake the browser URL, otherwise Wicket doesn't know the requested URL and cannot guess
    // the Content-Type
    tester.getRequest().setURL("index.html");

View Full Code Here

  public void testNotModifiedResponseIncludesExpiresHeader() throws IOException,
    ServletException, ParseException
  {
    try
    {
      application = new MockApplication();
      WicketFilter filter = new WicketFilter();
      filter.init(new FilterTestingConfig());
      application.set();
      DynamicImageResource resource = new DynamicImageResource()
      {
View Full Code Here

   * Creates <code>WicketTester</code> and automatically create a <code>WebApplication</code>, but
   * the tester will have no home page.
   */
  public BaseWicketTester()
  {
    this(new MockApplication());
  }
View Full Code Here

TOP

Related Classes of org.apache.wicket.mock.MockApplication

Copyright © 2018 www.massapicom. 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.