Package org.apache.wicket.util.tester

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


      form.submit();
      tester.assertRenderedPage(HOME);
    }
    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

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

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

      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

    assertTrue(link.isEnabled());

    link = (Link)page.get("navigator:last");
    assertTrue(link.isEnabled());

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

    mockRequest.setRequestToComponent(form);
    mockWebApp.processRequestCycle();

    // assertion failed, getLastRenderedPage() return null.
    assertTrue(mockWebApp.getLastRenderedPage() instanceof SimplePage);
    mockWebApp.destroy();
  }
}
View Full Code Here

            ResourceReference.Key key = new ResourceReference.Key(LessResourceReferenceFactoryTest.class.getName(),
                                                                  "responsive.less", null, null, null);
            ResourceReference reference = registry.getResourceReference(key, false, true);
            assertThat(reference, is(instanceOf(LessResourceReference.class)));
        } finally {
            tester.destroy();
        }
    }
}
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.