Package org.apache.wicket.util.tester

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


    waTester.switchOffTestMode();
    // now the assertions will be the real last response

    tester.assertLabel("message", "Atmosphere rocks!");

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


    {
      tester.startPage(new CustomRequestPage());
    }
    finally
    {
      tester.destroy();
    }
  }

  /**
   * Assert that ServletWebRequest#getClientUrl() will throw an AbortWithHttpErrorCodeException
View Full Code Here

      assertEquals("9A0364B9E99BB480DD25E1F0284C8555", version);
    }
    finally
    {
      tester.destroy();
    }
  }


}
View Full Code Here

      assertEquals(TEST_RESOURCE_VERSION, version);
    }
    finally
    {
      tester.destroy();
    }
  }

}
View Full Code Here

    {
      tester.startPage(new CustomRequestPage());
    }
    finally
    {
      tester.destroy();
    }
  }

  /**
   * Assert that ServletWebRequest#getClientUrl() will throw an AbortWithHttpErrorCodeException
View Full Code Here

        new InstantiationPermissions());
    MetaDataRoleAuthorizationStrategy.authorize(Page.class, "martijn");
    MetaDataRoleAuthorizationStrategy.unauthorize(Page.class, "martijn");
    assertFalse(strategy.isInstantiationAuthorized(Page.class));
    tester.processRequestCycle();
    tester.destroy();
  }
}
View Full Code Here

    label.setMetaData(MetaDataRoleAuthorizationStrategy.ACTION_PERMISSIONS,
        new ActionPermissions());
    MetaDataRoleAuthorizationStrategy.unauthorize(label, mambo, "johan");
    assertFalse(strategy.isActionAuthorized(label, mambo));
    tester.processRequestCycle();
    tester.destroy();
  }

  /**
   * Test consistency in behavior between authorizing a role for an action and then unauthorizing
   * it with {@link #testRemove2()}.
View Full Code Here

        new ActionPermissions());
    MetaDataRoleAuthorizationStrategy.authorize(label, mambo, "johan");
    MetaDataRoleAuthorizationStrategy.unauthorize(label, mambo, "johan");
    assertFalse(strategy.isActionAuthorized(label, mambo));
    tester.processRequestCycle();
    tester.destroy();
  }
}
View Full Code Here

        MetaDataRoleAuthorizationStrategy.INSTANTIATION_PERMISSIONS,
        new InstantiationPermissions());
    MetaDataRoleAuthorizationStrategy.unauthorize(Page.class, "martijn");
    assertFalse(strategy.isInstantiationAuthorized(Page.class));
    tester.processRequestCycle();
    tester.destroy();
  }

  /**
   * Test consistency in behavior between authorizing a role for a class and then unauthorizing it
   * with {@link #testRemove2()}.
View Full Code Here

    tester.setupRequestAndResponse();
    tester.getServletRequest()
        .setURL("?wicket:bookmarkablePage=:" + Page1.class.getName() + "");
    tester.processRequestCycle();
    tester.assertRenderedPage(Page3.class);
    tester.destroy();
  }

  public void testFoo()
  {
    // FIXME remove this when turning on the above test
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.