diff options
author | Leif Åstrand <leif@vaadin.com> | 2012-10-08 13:17:07 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2012-10-08 10:43:19 +0000 |
commit | 48c19777e566dd8cd5e496ea364de8aea447abbf (patch) | |
tree | e6f5ff65c2d4d249230e92e62a52db537e6042a7 /server/tests/src/com/vaadin | |
parent | 13d5b3e98954c2ade382305f8d044b2b49fdbd0b (diff) | |
download | vaadin-framework-48c19777e566dd8cd5e496ea364de8aea447abbf.tar.gz vaadin-framework-48c19777e566dd8cd5e496ea364de8aea447abbf.zip |
Remove VaadinServiceSession.getURL (#9884)
* Give an URL to LegacyApplication when initializing
* Update LoginForm to use DynamicConnectorResource instead of
RequestHandler
* Make CustomUIClassLoader work again (including previous issues not
caused by this change)
* Update some other tests to use more sensible URLs
Change-Id: I53ed5e9be3b44ed1b62f9762507b0007d53f15b7
Diffstat (limited to 'server/tests/src/com/vaadin')
-rw-r--r-- | server/tests/src/com/vaadin/tests/server/component/root/CustomUIClassLoader.java | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/server/tests/src/com/vaadin/tests/server/component/root/CustomUIClassLoader.java b/server/tests/src/com/vaadin/tests/server/component/root/CustomUIClassLoader.java index e071c0e484..405d3d1931 100644 --- a/server/tests/src/com/vaadin/tests/server/component/root/CustomUIClassLoader.java +++ b/server/tests/src/com/vaadin/tests/server/component/root/CustomUIClassLoader.java @@ -15,7 +15,6 @@ import com.vaadin.server.UIClassSelectionEvent; import com.vaadin.server.VaadinRequest; import com.vaadin.server.VaadinService; import com.vaadin.server.VaadinServiceSession; -import com.vaadin.server.VaadinServiceSession.SessionStartEvent; import com.vaadin.ui.UI; public class CustomUIClassLoader extends TestCase { @@ -55,8 +54,7 @@ public class CustomUIClassLoader extends TestCase { */ public void testWithNullClassLoader() throws Exception { VaadinServiceSession application = createStubApplication(); - application.start(new SessionStartEvent(null, - createConfigurationMock(), null)); + application.setConfiguration(createConfigurationMock()); DefaultUIProvider uiProvider = new DefaultUIProvider(); Class<? extends UI> uiClass = uiProvider @@ -76,12 +74,16 @@ public class CustomUIClassLoader extends TestCase { // Mock a VaadinService to give the passed classloader VaadinService configurationMock = EasyMock .createMock(VaadinService.class); + EasyMock.expect(configurationMock.getDeploymentConfiguration()) + .andReturn(createConfigurationMock()); EasyMock.expect(configurationMock.getClassLoader()).andReturn( classloader); // Mock a VaadinRequest to give the mocked vaadin service VaadinRequest requestMock = EasyMock.createMock(VaadinRequest.class); EasyMock.expect(requestMock.getService()).andReturn(configurationMock); + EasyMock.expect(requestMock.getService()).andReturn(configurationMock); + EasyMock.expect(requestMock.getService()).andReturn(configurationMock); EasyMock.replay(configurationMock, requestMock); return requestMock; @@ -97,13 +99,10 @@ public class CustomUIClassLoader extends TestCase { public void testWithClassLoader() throws Exception { LoggingClassLoader loggingClassLoader = new LoggingClassLoader(); - VaadinServiceSession application = createStubApplication(); - application.start(new SessionStartEvent(null, - createConfigurationMock(), null)); - DefaultUIProvider uiProvider = new DefaultUIProvider(); Class<? extends UI> uiClass = uiProvider - .getUIClass(new UIClassSelectionEvent(createRequestMock(null))); + .getUIClass(new UIClassSelectionEvent( + createRequestMock(loggingClassLoader))); assertEquals(MyUI.class, uiClass); assertEquals(1, loggingClassLoader.requestedClasses.size()); |