use of org.apache.wicket.versioning.InMemoryPageStore in project wicket by apache.
the class PersistentPageManagerTest method newPersistentPageManager.
private PageStoreManager newPersistentPageManager(String appName) {
IDataStore dataStore = new InMemoryPageStore();
IPageStore pageStore = new DefaultPageStore(new JavaSerializer(appName), dataStore, 4);
IPageManagerContext pageManagerContext = new DummyPageManagerContext();
return new PageStoreManager(appName, pageStore, pageManagerContext);
}
use of org.apache.wicket.versioning.InMemoryPageStore in project wicket by apache.
the class PageIdPoliticTest method setUp.
@Before
public void setUp() throws Exception {
application = new MockApplication();
dataStore = new InMemoryPageStore() {
@Override
public void storeData(String sessionId, int pageId, byte[] pageAsBytes) {
super.storeData(sessionId, pageId, pageAsBytes);
storeCount++;
}
};
tester = new WicketTester(application) {
@Override
protected IPageManagerProvider newTestPageManagerProvider() {
return new IPageManagerProvider() {
@Override
public IPageManager apply(IPageManagerContext pageManagerContext) {
IPageStore pageStore = new DefaultPageStore(new JavaSerializer(application.getApplicationKey()), dataStore, 4);
return new PageStoreManager(application.getName(), pageStore, pageManagerContext);
}
};
}
};
}
Aggregations