Package org.apache.wicket.mock

Examples of org.apache.wicket.mock.MockApplication


public class StartComponentInPageRedirectToRenderTest extends WicketTestCase
{
  @Override
  protected WebApplication newApplication()
  {
    return new MockApplication()
    {
      @Override
      protected void init()
      {
        super.init();
View Full Code Here


   */
  @Before
  public void before()
  {
    final IAuthorizationStrategy strategy = new CustomStrategy();
    tester = new WicketTester(new MockApplication()
    {
      @Override
      public Session newSession(Request request, Response response)
      {
        return new WebSession(request)
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

   * @param homePage
   *            a home page <code>Class</code>
   */
  public <C extends Page> BaseWicketTester(final Class<C> homePage)
  {
    this(new MockApplication()
    {
      /**
       * @see org.apache.wicket.Application#getHomePage()
       */
      @Override
 
View Full Code Here

  private WicketTester tester;

  @Before
  public void before()
  {
    tester = new WicketTester(new MockApplication()
    {
      @Override
      protected void init()
      {
        super.init();
View Full Code Here

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

   * {@link RequireHttps}
   */
  @Test
  public void checkSecureIncoming()
  {
    final WebApplication application = new MockApplication();

    // needed to be able to call new WebPage()
    final WicketTester tester = new WicketTester(application);
    ThreadContext.setApplication(application);

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

   * @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

   * 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.