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()
    {
      /**
       * @see org.apache.wicket.Application#getHomePage()
       */
      @Override
 
View Full Code Here


public class WicketTesterLazyIsPageStatelessRedirectToBufferTest extends WicketTesterLazyIsPageStatelessBase
{
  @Override
  protected WebApplication newApplication()
  {
    return new MockApplication()
    {
      @Override
      public void init() {
        super.init();
        getRequestCycleSettings().setRenderStrategy(RequestCycleSettings.RenderStrategy.REDIRECT_TO_BUFFER);
View Full Code Here

  }

  @Override
  protected WebApplication newApplication()
  {
    return new MockApplication()
    {
      @Override
      protected void init()
      {
        super.init();
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

   *
   */
  @Test
  public void testFrameworkVersion()
  {
    IFrameworkSettings settings = new FrameworkSettings(new MockApplication());
    assertEquals("n/a", settings.getVersion());
  }
View Full Code Here

   * @throws Exception
   */
  @Test
  public void testExceptionOnMissingResourceDefaultValue() throws Exception
  {
    IResourceSettings settings = new ResourceSettings(new MockApplication());
    Assert.assertTrue("exceptionOnMissingResource should default to true",
      settings.getThrowExceptionOnMissingResource());
  }
View Full Code Here

   * @throws Exception
   */
  @Test
  public void testExceptionOnMissingResourceSetsCorrectly() throws Exception
  {
    IResourceSettings settings = new ResourceSettings(new MockApplication());
    settings.setThrowExceptionOnMissingResource(false);
    Assert.assertFalse("exceptionOnMissingResource should have been set to false",
      settings.getThrowExceptionOnMissingResource());
  }
View Full Code Here

   * @throws Exception
   */
  @Test
  public void testUseDefaultOnMissingResourceDefaultValue() throws Exception
  {
    IResourceSettings settings = new ResourceSettings(new MockApplication());
    Assert.assertTrue("useDefaultOnMissingResource should default to true",
      settings.getUseDefaultOnMissingResource());
  }
View Full Code Here

   * @throws Exception
   */
  @Test
  public void testUseDefaultOnMissingResourceSetsCorrectly() throws Exception
  {
    IResourceSettings settings = new ResourceSettings(new MockApplication());
    settings.setUseDefaultOnMissingResource(false);
    Assert.assertFalse("useDefaultOnMissingResource should have been set to false",
      settings.getUseDefaultOnMissingResource());
  }
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.