Examples of cleanSessionCache()


Examples of org.apache.wicket.core.request.mapper.TestMapperContext.cleanSessionCache()

    TestMapperContext mapperContext = new TestMapperContext();
    mapperContext.getPageManager().touchPage(testPage);
    mapperContext.getPageManager().commitRequest();

    // by cleaning session cache we make sure of not being testing the same in-memory instance
    mapperContext.cleanSessionCache();

    PageProvider pageProvider = mapperContext.new TestPageProvider(testPage.getPageId(), 0);

    // simulation an test call to isNewPageInstance
    boolean isNewPageInstance = pageProvider.isNewPageInstance();
View Full Code Here

Examples of org.apache.wicket.core.request.mapper.TestMapperContext.cleanSessionCache()

    providedPage.state = newState;
    mapperContext.getPageManager().touchPage(providedPage);
    mapperContext.getPageManager().commitRequest();


    mapperContext.cleanSessionCache();

    StatefullMockPage restauredPageAfterStateChage = (StatefullMockPage)mapperContext.getPageInstance(testPage.getPageId());

    // OK, if the correct page got touched/stores its change will be visible now
    assertEquals(newState, restauredPageAfterStateChage.state);
View Full Code Here

Examples of org.apache.wicket.core.request.mapper.TestMapperContext.cleanSessionCache()

    Page page = new TestPage();
    mapperContext.getPageManager().touchPage(page);
    mapperContext.getPageManager().commitRequest();

    // by cleaning session cache we make sure of not being testing the same in-memory instance
    mapperContext.cleanSessionCache();

    PageProvider provider = mapperContext.new TestPageProvider(page.getPageId(), 0);
    assertTrue(provider.hasPageInstance());
    assertFalse(provider.isPageInstanceFresh());
  }
View Full Code Here

Examples of org.apache.wicket.core.request.mapper.TestMapperContext.cleanSessionCache()

    TestMapperContext mapperContext = new TestMapperContext();
    mapperContext.getPageManager().touchPage(testPage);
    mapperContext.getPageManager().commitRequest();

    // by cleaning session cache we make sure of not being testing the same in-memory instance
    mapperContext.cleanSessionCache();

    PageProvider pageProvider = mapperContext.new TestPageProvider(testPage.getPageId(), 0);

    // simulation an test call to isNewPageInstance
    boolean isNewPageInstance = pageProvider.isNewPageInstance();
View Full Code Here

Examples of org.apache.wicket.core.request.mapper.TestMapperContext.cleanSessionCache()

    providedPage.state = newState;
    mapperContext.getPageManager().touchPage(providedPage);
    mapperContext.getPageManager().commitRequest();


    mapperContext.cleanSessionCache();

    StatefullMockPage restauredPageAfterStateChage = (StatefullMockPage)mapperContext.getPageInstance(testPage.getPageId());

    // OK, if the correct page got touched/stores its change will be visible now
    assertEquals(newState, restauredPageAfterStateChage.state);
View Full Code Here

Examples of org.apache.wicket.core.request.mapper.TestMapperContext.cleanSessionCache()

    Page page = new TestPage();
    mapperContext.getPageManager().touchPage(page);
    mapperContext.getPageManager().commitRequest();

    // by cleaning session cache we make sure of not being testing the same in-memory instance
    mapperContext.cleanSessionCache();

    PageProvider provider = mapperContext.new TestPageProvider(page.getPageId(), 0);
    assertTrue(provider.hasPageInstance());
    assertFalse(provider.isPageInstanceFresh());
  }
View Full Code Here

Examples of org.apache.wicket.core.request.mapper.TestMapperContext.cleanSessionCache()

    Page page = new TestPage();
    mapperContext.getPageManager().touchPage(page);
    mapperContext.getPageManager().commitRequest();

    // by cleaning session cache we make sure of not being testing the same in-memory instance
    mapperContext.cleanSessionCache();

    PageProvider provider = new PageProvider(page.getPageId(), MockPageWithLink.class, 0);
    assertFalse(provider.hasPageInstance());
    assertEquals(MockPageWithLink.class, provider.getPageInstance().getClass());
    assertTrue(provider.isPageInstanceFresh());
View Full Code Here

Examples of org.apache.wicket.request.mapper.TestMapperContext.cleanSessionCache()

    TestMapperContext mapperContext = new TestMapperContext();
    mapperContext.getPageManager().touchPage(testPage);
    mapperContext.getPageManager().commitRequest();

    // by cleaning session cache we make sure of not being testing the same in-memory instance
    mapperContext.cleanSessionCache();

    PageProvider pageProvider = mapperContext.new TestPageProvider(testPage.getPageId(), 0);

    // simulation an test call to isNewPageInstance
    boolean isNewPageInstance = pageProvider.isNewPageInstance();
View Full Code Here

Examples of org.apache.wicket.request.mapper.TestMapperContext.cleanSessionCache()

    providedPage.state = newState;
    mapperContext.getPageManager().touchPage(providedPage);
    mapperContext.getPageManager().commitRequest();


    mapperContext.cleanSessionCache();

    StatefullMockPage restauredPageAfterStateChage = (StatefullMockPage)mapperContext.getPageInstance(testPage.getPageId());

    // OK, if the correct page got touched/stores its change will be visible now
    assertEquals(newState, restauredPageAfterStateChage.state);
View Full Code Here

Examples of org.apache.wicket.request.mapper.TestMapperContext.cleanSessionCache()

    Page page = new TestPage();
    mapperContext.getPageManager().touchPage(page);
    mapperContext.getPageManager().commitRequest();

    // by cleaning session cache we make sure of not being testing the same in-memory instance
    mapperContext.cleanSessionCache();

    PageProvider provider = mapperContext.new TestPageProvider(page.getPageId(), 0);

    // no instance yet
    assertFalse(provider.hasPageInstance());
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.