]> source.dussan.org Git - vaadin-framework.git/commitdiff
Updatet servlet tests to follow the same *Test naming convention
authorArtur Signell <artur@vaadin.com>
Mon, 7 Oct 2013 17:34:23 +0000 (20:34 +0300)
committerVaadin Code Review <review@vaadin.com>
Tue, 8 Oct 2013 13:19:53 +0000 (13:19 +0000)
Change-Id: I3c718232364f5ca7cce7131fa7685e4a2b833120

17 files changed:
WebContent/WEB-INF/web.xml
WebContent/WEB-INF/web.xml.2.4
uitest/src/com/vaadin/tests/integration/AbstractIntegrationTest.java [new file with mode: 0644]
uitest/src/com/vaadin/tests/integration/AbstractIntegrationTestTB3.java [deleted file]
uitest/src/com/vaadin/tests/integration/AbstractServletIntegrationTest.java [new file with mode: 0644]
uitest/src/com/vaadin/tests/integration/IntegrationTestRunner.java
uitest/src/com/vaadin/tests/integration/IntegrationTestStreaming.java [deleted file]
uitest/src/com/vaadin/tests/integration/IntegrationTestUI.java [deleted file]
uitest/src/com/vaadin/tests/integration/IntegrationTestWebsocket.java [deleted file]
uitest/src/com/vaadin/tests/integration/ServletIntegrationStreamingUI.java [new file with mode: 0644]
uitest/src/com/vaadin/tests/integration/ServletIntegrationStreamingUITest.java [new file with mode: 0644]
uitest/src/com/vaadin/tests/integration/ServletIntegrationTestTB3.java [deleted file]
uitest/src/com/vaadin/tests/integration/ServletIntegrationUI.java [new file with mode: 0755]
uitest/src/com/vaadin/tests/integration/ServletIntegrationUITest.java [new file with mode: 0644]
uitest/src/com/vaadin/tests/integration/ServletIntegrationWebsocketUI.java [new file with mode: 0644]
uitest/src/com/vaadin/tests/integration/ServletIntegrationWebsocketUITest.java [new file with mode: 0644]
uitest/src/com/vaadin/tests/tb3/ServletIntegrationTests.java

index b93e0670fce9c50f4db55937c7a4f773d901b361..8a917966a102580b2cb671de1496fdefadf5d587 100644 (file)
@@ -92,7 +92,7 @@
         <servlet-class>com.vaadin.server.VaadinServlet</servlet-class>
         <init-param>
             <param-name>UI</param-name>
-            <param-value>com.vaadin.tests.integration.IntegrationTestUI</param-value>
+            <param-value>com.vaadin.tests.integration.ServletIntegrationUI</param-value>
         </init-param>
         <async-supported>true</async-supported>
     </servlet>
index bcc5f3a65179bd96e8f3f0abdffe5ef1e61712c9..96144b8036d020f77254175dcc4c5ff26f1e5a12 100644 (file)
@@ -86,7 +86,7 @@
                <servlet-class>com.vaadin.server.VaadinServlet</servlet-class>
                <init-param>
                        <param-name>UI</param-name>
-                       <param-value>com.vaadin.tests.integration.IntegrationTestUI</param-value>
+                       <param-value>com.vaadin.tests.integration.ServletIntegrationUI</param-value>
                </init-param>
        </servlet>
        <servlet-mapping>
diff --git a/uitest/src/com/vaadin/tests/integration/AbstractIntegrationTest.java b/uitest/src/com/vaadin/tests/integration/AbstractIntegrationTest.java
new file mode 100644 (file)
index 0000000..5f4ae41
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2000-2013 Vaadin Ltd.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.integration;
+
+import java.util.Collection;
+import java.util.Collections;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized.Parameters;
+import org.openqa.selenium.remote.DesiredCapabilities;
+
+import com.vaadin.tests.tb3.PrivateTB3Configuration;
+
+/**
+ * Base class for integration tests. Integration tests use the
+ * {@literal deployment.url} parameter to determine the base deployment url
+ * (http://hostname:123)
+ * 
+ * @author Vaadin Ltd
+ */
+@RunWith(IntegrationTestRunner.class)
+public abstract class AbstractIntegrationTest extends
+        PrivateTB3Configuration {
+    @Override
+    protected String getBaseURL() {
+        String deploymentUrl = System.getProperty("deployment.url");
+        if (deploymentUrl == null || deploymentUrl.equals("")) {
+            throw new RuntimeException(
+                    "Deployment url must be given as deployment.url");
+        }
+
+        return deploymentUrl;
+    }
+
+    @Parameters
+    public static Collection<DesiredCapabilities> getBrowsersForTest() {
+        return Collections.singleton(BrowserUtil.firefox(17));
+    }
+
+}
diff --git a/uitest/src/com/vaadin/tests/integration/AbstractIntegrationTestTB3.java b/uitest/src/com/vaadin/tests/integration/AbstractIntegrationTestTB3.java
deleted file mode 100644 (file)
index e170450..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright 2000-2013 Vaadin Ltd.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.vaadin.tests.integration;
-
-import java.util.Collection;
-import java.util.Collections;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized.Parameters;
-import org.openqa.selenium.remote.DesiredCapabilities;
-
-import com.vaadin.tests.tb3.PrivateTB3Configuration;
-
-/**
- * Base class for integration tests. Integration tests use the
- * {@literal deployment.url} parameter to determine the base deployment url
- * (http://hostname:123)
- * 
- * @author Vaadin Ltd
- */
-@RunWith(IntegrationTestRunner.class)
-public abstract class AbstractIntegrationTestTB3 extends
-        PrivateTB3Configuration {
-    @Override
-    protected String getBaseURL() {
-        String deploymentUrl = System.getProperty("deployment.url");
-        if (deploymentUrl == null || deploymentUrl.equals("")) {
-            throw new RuntimeException(
-                    "Deployment url must be given as deployment.url");
-        }
-
-        return deploymentUrl;
-    }
-
-    @Parameters
-    public static Collection<DesiredCapabilities> getBrowsersForTest() {
-        return Collections.singleton(BrowserUtil.firefox(17));
-    }
-
-}
diff --git a/uitest/src/com/vaadin/tests/integration/AbstractServletIntegrationTest.java b/uitest/src/com/vaadin/tests/integration/AbstractServletIntegrationTest.java
new file mode 100644 (file)
index 0000000..f736a12
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2000-2013 Vaadin Ltd.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.integration;
+
+import java.io.IOException;
+
+import org.junit.Test;
+import org.openqa.selenium.WebElement;
+
+/**
+ * Base class for servlet integration tests. Automatically prepends "/demo" to
+ * the deployment path
+ * 
+ * @author Vaadin Ltd
+ */
+public abstract class AbstractServletIntegrationTest extends
+        AbstractIntegrationTest {
+
+    @Test
+    public void runTest() throws IOException, AssertionError {
+        openTestURL();
+        compareScreen("initial");
+
+        WebElement cell = vaadinElement(getTableCell(getTable(), 0, 1));
+        testBenchElement(cell).click(51, 13);
+
+        compareScreen("finland");
+    }
+
+    private String getTableCell(String tableLocator, int row, int col) {
+        return tableLocator
+                + "/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild["
+                + row + "]/domChild[" + col + "]/domChild[0]";
+    }
+
+    protected String getTable() {
+        return "/VVerticalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]";
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see com.vaadin.tests.tb3.AbstractTB3Test#getDeploymentPath()
+     */
+    @Override
+    protected String getDeploymentPath() {
+        return "/demo" + super.getDeploymentPath();
+    }
+
+}
index 29ee4e6023e0b8f6b5ed23316b88f23228644d2d..f5042b54b6644e1208e58316ec937e0dc7142b6e 100644 (file)
@@ -45,7 +45,7 @@ public class IntegrationTestRunner extends TB3Runner {
      */
     @Override
     protected String testName(FrameworkMethod method) {
-        if (AbstractIntegrationTestTB3.class.isAssignableFrom(testClass)) {
+        if (AbstractIntegrationTest.class.isAssignableFrom(testClass)) {
             return System.getProperty("server-name");
         } else {
             return super.testName(method);
diff --git a/uitest/src/com/vaadin/tests/integration/IntegrationTestStreaming.java b/uitest/src/com/vaadin/tests/integration/IntegrationTestStreaming.java
deleted file mode 100644 (file)
index 20ddac9..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2000-2013 Vaadin Ltd.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.vaadin.tests.integration;
-
-import com.vaadin.annotations.Push;
-import com.vaadin.shared.ui.ui.Transport;
-
-/**
- * Server test which uses streaming
- * 
- * @since 7.1
- * @author Vaadin Ltd
- */
-@Push(transport = Transport.STREAMING)
-public class IntegrationTestStreaming extends IntegrationTestUI {
-
-    public static class IntegrationTestStreamingTB3 extends
-            ServletIntegrationTestTB3 {
-        // Uses the test method declared in the super class
-    }
-
-}
diff --git a/uitest/src/com/vaadin/tests/integration/IntegrationTestUI.java b/uitest/src/com/vaadin/tests/integration/IntegrationTestUI.java
deleted file mode 100755 (executable)
index 3d0a338..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-package com.vaadin.tests.integration;
-
-import com.vaadin.data.Item;
-import com.vaadin.data.Property.ValueChangeEvent;
-import com.vaadin.data.Property.ValueChangeListener;
-import com.vaadin.server.ClassResource;
-import com.vaadin.server.Resource;
-import com.vaadin.server.VaadinRequest;
-import com.vaadin.ui.Label;
-import com.vaadin.ui.Table;
-import com.vaadin.ui.UI;
-import com.vaadin.ui.VerticalLayout;
-
-public class IntegrationTestUI extends UI {
-
-    public class IntegrationTestXhrTB3 extends ServletIntegrationTestTB3 {
-        // Uses the test method declared in the super class
-    }
-
-    @Override
-    protected void init(VaadinRequest request) {
-        VerticalLayout layout = new VerticalLayout();
-        layout.setMargin(true);
-        setContent(layout);
-
-        final Table table = new Table();
-        table.addContainerProperty("icon", Resource.class, null);
-        table.setItemIconPropertyId("icon");
-        table.addContainerProperty("country", String.class, null);
-        table.setRowHeaderMode(Table.RowHeaderMode.ICON_ONLY);
-        table.setImmediate(true);
-        table.setSelectable(true);
-        table.setVisibleColumns(new Object[] { "country" });
-        layout.addComponent(table);
-
-        Item item = table.addItem("FI");
-        item.getItemProperty("icon").setValue(new ClassResource("fi.gif"));
-        item.getItemProperty("country").setValue("Finland");
-        item = table.addItem("SE");
-        item.getItemProperty("icon").setValue(new FlagSeResource());
-        item.getItemProperty("country").setValue("Sweden");
-
-        final Label selectedLabel = new Label();
-        table.addValueChangeListener(new ValueChangeListener() {
-            @Override
-            public void valueChange(ValueChangeEvent event) {
-                selectedLabel.setValue(String.valueOf(table.getValue()));
-            }
-        });
-        layout.addComponent(selectedLabel);
-    }
-}
diff --git a/uitest/src/com/vaadin/tests/integration/IntegrationTestWebsocket.java b/uitest/src/com/vaadin/tests/integration/IntegrationTestWebsocket.java
deleted file mode 100644 (file)
index eaa23de..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2000-2013 Vaadin Ltd.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.vaadin.tests.integration;
-
-import com.vaadin.annotations.Push;
-import com.vaadin.server.VaadinRequest;
-import com.vaadin.shared.ui.ui.Transport;
-
-/**
- * Server test which uses websockets
- * 
- * @since 7.1
- * @author Vaadin Ltd
- */
-@Push(transport = Transport.WEBSOCKET)
-public class IntegrationTestWebsocket extends IntegrationTestUI {
-
-    public class IntegrationTestWebsocketTB3 extends ServletIntegrationTestTB3 {
-        // Uses the test method declared in the super class
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see
-     * com.vaadin.tests.integration.IntegrationTestUI#init(com.vaadin.server
-     * .VaadinRequest)
-     */
-    @Override
-    protected void init(VaadinRequest request) {
-        super.init(request);
-        // Ensure no fallback is used
-        getPushConfiguration().setFallbackTransport(Transport.WEBSOCKET);
-    }
-
-}
diff --git a/uitest/src/com/vaadin/tests/integration/ServletIntegrationStreamingUI.java b/uitest/src/com/vaadin/tests/integration/ServletIntegrationStreamingUI.java
new file mode 100644 (file)
index 0000000..0d92fb1
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2000-2013 Vaadin Ltd.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.integration;
+
+import com.vaadin.annotations.Push;
+import com.vaadin.shared.ui.ui.Transport;
+
+/**
+ * Server test which uses streaming
+ * 
+ * @since 7.1
+ * @author Vaadin Ltd
+ */
+@Push(transport = Transport.STREAMING)
+public class ServletIntegrationStreamingUI extends ServletIntegrationUI {
+
+}
diff --git a/uitest/src/com/vaadin/tests/integration/ServletIntegrationStreamingUITest.java b/uitest/src/com/vaadin/tests/integration/ServletIntegrationStreamingUITest.java
new file mode 100644 (file)
index 0000000..36a946b
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ * Copyright 2000-2013 Vaadin Ltd.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.integration;
+
+public class ServletIntegrationStreamingUITest extends
+        AbstractServletIntegrationTest {
+    // Uses the test method declared in the super class
+}
\ No newline at end of file
diff --git a/uitest/src/com/vaadin/tests/integration/ServletIntegrationTestTB3.java b/uitest/src/com/vaadin/tests/integration/ServletIntegrationTestTB3.java
deleted file mode 100644 (file)
index 2a2f8ab..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright 2000-2013 Vaadin Ltd.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.vaadin.tests.integration;
-
-import java.io.IOException;
-
-import org.junit.Test;
-import org.openqa.selenium.WebElement;
-
-/**
- * Base class for servlet integration tests. Automatically prepends "/demo" to
- * the deployment path
- * 
- * @author Vaadin Ltd
- */
-public abstract class ServletIntegrationTestTB3 extends
-        AbstractIntegrationTestTB3 {
-
-    @Test
-    public void runTest() throws IOException, AssertionError {
-        openTestURL();
-        compareScreen("initial");
-
-        WebElement cell = vaadinElement(getTableCell(getTable(), 0, 1));
-        testBenchElement(cell).click(51, 13);
-
-        compareScreen("finland");
-    }
-
-    private String getTableCell(String tableLocator, int row, int col) {
-        return tableLocator
-                + "/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild["
-                + row + "]/domChild[" + col + "]/domChild[0]";
-    }
-
-    protected String getTable() {
-        return "/VVerticalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]";
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.vaadin.tests.tb3.AbstractTB3Test#getDeploymentPath()
-     */
-    @Override
-    protected String getDeploymentPath() {
-        return "/demo" + super.getDeploymentPath();
-    }
-
-}
diff --git a/uitest/src/com/vaadin/tests/integration/ServletIntegrationUI.java b/uitest/src/com/vaadin/tests/integration/ServletIntegrationUI.java
new file mode 100755 (executable)
index 0000000..6aec2c8
--- /dev/null
@@ -0,0 +1,48 @@
+package com.vaadin.tests.integration;
+
+import com.vaadin.data.Item;
+import com.vaadin.data.Property.ValueChangeEvent;
+import com.vaadin.data.Property.ValueChangeListener;
+import com.vaadin.server.ClassResource;
+import com.vaadin.server.Resource;
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.Table;
+import com.vaadin.ui.UI;
+import com.vaadin.ui.VerticalLayout;
+
+public class ServletIntegrationUI extends UI {
+
+    @Override
+    protected void init(VaadinRequest request) {
+        VerticalLayout layout = new VerticalLayout();
+        layout.setMargin(true);
+        setContent(layout);
+
+        final Table table = new Table();
+        table.addContainerProperty("icon", Resource.class, null);
+        table.setItemIconPropertyId("icon");
+        table.addContainerProperty("country", String.class, null);
+        table.setRowHeaderMode(Table.RowHeaderMode.ICON_ONLY);
+        table.setImmediate(true);
+        table.setSelectable(true);
+        table.setVisibleColumns(new Object[] { "country" });
+        layout.addComponent(table);
+
+        Item item = table.addItem("FI");
+        item.getItemProperty("icon").setValue(new ClassResource("fi.gif"));
+        item.getItemProperty("country").setValue("Finland");
+        item = table.addItem("SE");
+        item.getItemProperty("icon").setValue(new FlagSeResource());
+        item.getItemProperty("country").setValue("Sweden");
+
+        final Label selectedLabel = new Label();
+        table.addValueChangeListener(new ValueChangeListener() {
+            @Override
+            public void valueChange(ValueChangeEvent event) {
+                selectedLabel.setValue(String.valueOf(table.getValue()));
+            }
+        });
+        layout.addComponent(selectedLabel);
+    }
+}
diff --git a/uitest/src/com/vaadin/tests/integration/ServletIntegrationUITest.java b/uitest/src/com/vaadin/tests/integration/ServletIntegrationUITest.java
new file mode 100644 (file)
index 0000000..25ffdac
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2000-2013 Vaadin Ltd.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.integration;
+
+public class ServletIntegrationUITest extends AbstractServletIntegrationTest {
+    // Uses the test method declared in the super class
+}
\ No newline at end of file
diff --git a/uitest/src/com/vaadin/tests/integration/ServletIntegrationWebsocketUI.java b/uitest/src/com/vaadin/tests/integration/ServletIntegrationWebsocketUI.java
new file mode 100644 (file)
index 0000000..905b80f
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2000-2013 Vaadin Ltd.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.integration;
+
+import com.vaadin.annotations.Push;
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.shared.ui.ui.Transport;
+
+/**
+ * Server test which uses websockets
+ * 
+ * @since 7.1
+ * @author Vaadin Ltd
+ */
+@Push(transport = Transport.WEBSOCKET)
+public class ServletIntegrationWebsocketUI extends ServletIntegrationUI {
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * com.vaadin.tests.integration.IntegrationTestUI#init(com.vaadin.server
+     * .VaadinRequest)
+     */
+    @Override
+    protected void init(VaadinRequest request) {
+        super.init(request);
+        // Ensure no fallback is used
+        getPushConfiguration().setFallbackTransport(Transport.WEBSOCKET);
+    }
+
+}
diff --git a/uitest/src/com/vaadin/tests/integration/ServletIntegrationWebsocketUITest.java b/uitest/src/com/vaadin/tests/integration/ServletIntegrationWebsocketUITest.java
new file mode 100644 (file)
index 0000000..f2e7a6f
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ * Copyright 2000-2013 Vaadin Ltd.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.integration;
+
+public class ServletIntegrationWebsocketUITest extends
+        AbstractServletIntegrationTest {
+    // Uses the test method declared in the super class
+}
\ No newline at end of file
index d2aa41374956a8cb42f37728400140043374fb57..c511b99e6e37109a8f85d6f2cbfcb0f9b1d6a60f 100644 (file)
@@ -19,7 +19,7 @@ package com.vaadin.tests.tb3;
 import org.junit.runner.RunWith;
 import org.junit.runners.model.InitializationError;
 
-import com.vaadin.tests.integration.ServletIntegrationTestTB3;
+import com.vaadin.tests.integration.AbstractServletIntegrationTest;
 import com.vaadin.tests.tb3.ServletIntegrationTests.ServletIntegrationTestSuite;
 
 @RunWith(ServletIntegrationTestSuite.class)
@@ -28,7 +28,7 @@ public class ServletIntegrationTests {
     public static class ServletIntegrationTestSuite extends TB3TestSuite {
         public ServletIntegrationTestSuite(Class<?> klass)
                 throws InitializationError {
-            super(klass, ServletIntegrationTestTB3.class,
+            super(klass, AbstractServletIntegrationTest.class,
                     "com.vaadin.tests.integration", new String[] {});
         }
     }