summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2013-06-13 20:12:53 +0300
committerArtur Signell <artur@vaadin.com>2013-06-13 20:14:47 +0300
commit997e9a9fcebd13c4eaf47f76fae14adf5e6a9675 (patch)
tree02b3ef66dd3716135894ef0f9fc1c81b36778692 /server
parent59103a959544016728f2967a3ce79a06f9bff7fa (diff)
downloadvaadin-framework-997e9a9fcebd13c4eaf47f76fae14adf5e6a9675.tar.gz
vaadin-framework-997e9a9fcebd13c4eaf47f76fae14adf5e6a9675.zip
Fixed test issue apparently caused by three levels of classes
Change-Id: I4985e39257d55eada134f340fb9981285c9bb26f
Diffstat (limited to 'server')
-rw-r--r--server/tests/src/com/vaadin/server/MockUIContainingServlet.java16
-rw-r--r--server/tests/src/com/vaadin/server/VaadinServletConfigurationTest.java25
2 files changed, 22 insertions, 19 deletions
diff --git a/server/tests/src/com/vaadin/server/MockUIContainingServlet.java b/server/tests/src/com/vaadin/server/MockUIContainingServlet.java
new file mode 100644
index 0000000000..d54242e31f
--- /dev/null
+++ b/server/tests/src/com/vaadin/server/MockUIContainingServlet.java
@@ -0,0 +1,16 @@
+package com.vaadin.server;
+
+import com.vaadin.ui.UI;
+
+public class MockUIContainingServlet extends UI {
+
+ public static class ServletInUI extends VaadinServlet {
+ // This servlet should automatically be configured to use the
+ // enclosing UI class
+ }
+
+ @Override
+ protected void init(VaadinRequest request) {
+ // Do nothing
+ }
+}
diff --git a/server/tests/src/com/vaadin/server/VaadinServletConfigurationTest.java b/server/tests/src/com/vaadin/server/VaadinServletConfigurationTest.java
index d347534f5c..3098970e6a 100644
--- a/server/tests/src/com/vaadin/server/VaadinServletConfigurationTest.java
+++ b/server/tests/src/com/vaadin/server/VaadinServletConfigurationTest.java
@@ -31,34 +31,21 @@ import org.junit.Test;
import com.vaadin.annotations.VaadinServletConfiguration;
import com.vaadin.server.DeploymentConfiguration.LegacyProperyToStringMode;
-import com.vaadin.server.VaadinServletConfigurationTest.MockUI;
-import com.vaadin.server.VaadinServletConfigurationTest.MockUI.ServletInUI;
+import com.vaadin.server.MockUIContainingServlet.ServletInUI;
import com.vaadin.ui.UI;
public class VaadinServletConfigurationTest {
- public static class MockUI extends UI {
-
- public static class ServletInUI extends VaadinServlet {
- // This servlet should automatically be configured to use the
- // enclosing UI class
- }
-
- @Override
- protected void init(VaadinRequest request) {
- // Do nothing
- }
- }
@Test
public void testEnclosingUIClass() throws Exception {
- ServletInUI servlet = new MockUI.ServletInUI();
+ ServletInUI servlet = new MockUIContainingServlet.ServletInUI();
servlet.init(new MockServletConfig());
Class<? extends UI> uiClass = new DefaultUIProvider()
.getUIClass(new UIClassSelectionEvent(new VaadinServletRequest(
EasyMock.createMock(HttpServletRequest.class), servlet
.getService())));
- Assert.assertEquals(MockUI.class, uiClass);
+ Assert.assertEquals(MockUIContainingServlet.class, uiClass);
}
@Test
@@ -79,7 +66,7 @@ public class VaadinServletConfigurationTest {
.getUIClass(new UIClassSelectionEvent(new VaadinServletRequest(
EasyMock.createMock(HttpServletRequest.class), servlet
.getService())));
- Assert.assertEquals(MockUI.class, uiClass);
+ Assert.assertEquals(MockUIContainingServlet.class, uiClass);
}
@Test
@@ -107,11 +94,11 @@ public class VaadinServletConfigurationTest {
.getUIClass(new UIClassSelectionEvent(new VaadinServletRequest(
EasyMock.createMock(HttpServletRequest.class), servlet
.getService())));
- Assert.assertEquals(MockUI.class, uiClass);
+ Assert.assertEquals(MockUIContainingServlet.class, uiClass);
}
}
-@VaadinServletConfiguration(productionMode = true, ui = MockUI.class, closeIdleSessions = true, heartbeatInterval = 1234, resourceCacheTime = 4321)
+@VaadinServletConfiguration(productionMode = true, ui = MockUIContainingServlet.class, closeIdleSessions = true, heartbeatInterval = 1234, resourceCacheTime = 4321)
class TestServlet extends VaadinServlet {
}