summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorSauli Tähkäpää <sauli@vaadin.com>2015-01-02 13:56:15 +0200
committerVaadin Code Review <review@vaadin.com>2015-01-09 13:35:01 +0000
commit6c3d35cfb8985eaac86f30316333a84f6096b76b (patch)
tree431794d12a43d39e62a1960489c4e7200955d313 /server
parent07e00fe8e09a224be2631df2e1ae2b8cbb46d466 (diff)
downloadvaadin-framework-6c3d35cfb8985eaac86f30316333a84f6096b76b.tar.gz
vaadin-framework-6c3d35cfb8985eaac86f30316333a84f6096b76b.zip
Refactor server unit tests.
- Renamed tests to *Test and *TestBase. - Removed obsolete @Ignore annotations. - Split some design tests into smaller ones. Change-Id: I8e2a7d73ef620e584777c1e8e701917c0f69f876
Diffstat (limited to 'server')
-rw-r--r--server/ivy.xml2
-rw-r--r--server/tests/src/com/vaadin/server/VaadinGateInRequestTest.java (renamed from server/tests/src/com/vaadin/server/VaadinGateInRequestTests.java)4
-rw-r--r--server/tests/src/com/vaadin/server/VaadinHttpAndPortletRequestTestBase.java (renamed from server/tests/src/com/vaadin/server/VaadinHttpAndPortletRequestTests.java)4
-rw-r--r--server/tests/src/com/vaadin/server/VaadinLiferayRequestTest.java (renamed from server/tests/src/com/vaadin/server/VaadinLiferayRequestTests.java)4
-rw-r--r--server/tests/src/com/vaadin/server/VaadinWebSpherePortalRequestTest.java (renamed from server/tests/src/com/vaadin/server/VaadinWebSpherePortalRequestTests.java)4
-rw-r--r--server/tests/src/com/vaadin/tests/design/DesignReadInConstructor.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/InvalidLayoutTemplate.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/LayoutTemplate.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/LocaleTest.java (renamed from server/tests/src/com/vaadin/tests/design/TestLocale.java)11
-rw-r--r--server/tests/src/com/vaadin/tests/design/ParseAllSupportedComponentsTest.java30
-rw-r--r--server/tests/src/com/vaadin/tests/design/ParseLayoutTest.java229
-rw-r--r--server/tests/src/com/vaadin/tests/design/designroot/DesignWithAnnotation.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/designroot/DesignWithEmptyAnnotation.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithAnnotation.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotation.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotationUI.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/MyChildDesign.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/MyChildDesignCustomComponent.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/MyDesignRoot.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/MyExtendedChildDesign.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/NestedCustomLayoutsTest.java (renamed from server/tests/src/com/vaadin/tests/design/nested/TestNestedCustomLayouts.java)58
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/ReadNestedTemplatesTest.java71
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/TestReadNestedTemplates.java62
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/WriteNestedTemplatesTest.java (renamed from server/tests/src/com/vaadin/tests/design/nested/TestWriteNestedTemplates.java)64
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomAbsoluteLayout.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomAccordion.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomCssLayout.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomFormLayout.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomGridLayout.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomHorizontalLayout.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomHorizontalSplitPanel.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomPanel.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomTabSheet.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomVerticalLayout.java3
-rw-r--r--server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomVerticalSplitPanel.java3
35 files changed, 281 insertions, 331 deletions
diff --git a/server/ivy.xml b/server/ivy.xml
index 2901be8090..b30e6a72ef 100644
--- a/server/ivy.xml
+++ b/server/ivy.xml
@@ -70,6 +70,8 @@
conf="test,ide -> default" />
<dependency org="org.mockito" name="mockito-all" rev="1.9.5"
conf="test,ide->default" />
+ <dependency org="org.hamcrest" name="hamcrest-all" rev="1.3"
+ conf="test,ide->default" />
<dependency org="org.easymock" name="easymock" rev="3.0"
conf="test,ide-> default" transitive="true" />
<dependency org="org.hsqldb" name="hsqldb" rev="2.2.6"
diff --git a/server/tests/src/com/vaadin/server/VaadinGateInRequestTests.java b/server/tests/src/com/vaadin/server/VaadinGateInRequestTest.java
index 4478b4cf39..eda2b3a006 100644
--- a/server/tests/src/com/vaadin/server/VaadinGateInRequestTests.java
+++ b/server/tests/src/com/vaadin/server/VaadinGateInRequestTest.java
@@ -20,8 +20,8 @@ import static org.mockito.Mockito.spy;
import com.vaadin.server.VaadinPortlet.VaadinGateInRequest;
-public class VaadinGateInRequestTests extends
- VaadinHttpAndPortletRequestTests<VaadinGateInRequest> {
+public class VaadinGateInRequestTest extends
+ VaadinHttpAndPortletRequestTestBase<VaadinGateInRequest> {
@Override
protected VaadinGateInRequest createSut() {
diff --git a/server/tests/src/com/vaadin/server/VaadinHttpAndPortletRequestTests.java b/server/tests/src/com/vaadin/server/VaadinHttpAndPortletRequestTestBase.java
index a87eb1870e..0f7cce5f75 100644
--- a/server/tests/src/com/vaadin/server/VaadinHttpAndPortletRequestTests.java
+++ b/server/tests/src/com/vaadin/server/VaadinHttpAndPortletRequestTestBase.java
@@ -33,9 +33,7 @@ import org.junit.Test;
import com.vaadin.server.VaadinPortlet.VaadinHttpAndPortletRequest;
import com.vaadin.server.VaadinPortletService;
-//Have to ignore this class - otherwise JUnit tries to instantiate it...
-@Ignore
-public abstract class VaadinHttpAndPortletRequestTests<T extends VaadinHttpAndPortletRequest> {
+public abstract class VaadinHttpAndPortletRequestTestBase<T extends VaadinHttpAndPortletRequest> {
protected VaadinHttpAndPortletRequest sut;
protected HttpServletRequest servletRequest;
diff --git a/server/tests/src/com/vaadin/server/VaadinLiferayRequestTests.java b/server/tests/src/com/vaadin/server/VaadinLiferayRequestTest.java
index 8ccd649ea4..3024cd652f 100644
--- a/server/tests/src/com/vaadin/server/VaadinLiferayRequestTests.java
+++ b/server/tests/src/com/vaadin/server/VaadinLiferayRequestTest.java
@@ -20,8 +20,8 @@ import static org.mockito.Mockito.spy;
import com.vaadin.server.VaadinPortlet.VaadinLiferayRequest;
-public class VaadinLiferayRequestTests extends
- VaadinHttpAndPortletRequestTests<VaadinLiferayRequest> {
+public class VaadinLiferayRequestTest extends
+ VaadinHttpAndPortletRequestTestBase<VaadinLiferayRequest> {
@Override
protected VaadinLiferayRequest createSut() {
diff --git a/server/tests/src/com/vaadin/server/VaadinWebSpherePortalRequestTests.java b/server/tests/src/com/vaadin/server/VaadinWebSpherePortalRequestTest.java
index a1abfbd280..3a4c5c69be 100644
--- a/server/tests/src/com/vaadin/server/VaadinWebSpherePortalRequestTests.java
+++ b/server/tests/src/com/vaadin/server/VaadinWebSpherePortalRequestTest.java
@@ -20,8 +20,8 @@ import static org.mockito.Mockito.spy;
import com.vaadin.server.VaadinPortlet.VaadinWebSpherePortalRequest;
-public class VaadinWebSpherePortalRequestTests extends
- VaadinHttpAndPortletRequestTests<VaadinWebSpherePortalRequest> {
+public class VaadinWebSpherePortalRequestTest extends
+ VaadinHttpAndPortletRequestTestBase<VaadinWebSpherePortalRequest> {
@Override
protected VaadinWebSpherePortalRequest createSut() {
diff --git a/server/tests/src/com/vaadin/tests/design/DesignReadInConstructor.java b/server/tests/src/com/vaadin/tests/design/DesignReadInConstructor.java
index ce80d98324..6eccaf6a2c 100644
--- a/server/tests/src/com/vaadin/tests/design/DesignReadInConstructor.java
+++ b/server/tests/src/com/vaadin/tests/design/DesignReadInConstructor.java
@@ -15,12 +15,9 @@
*/
package com.vaadin.tests.design;
-import org.junit.Ignore;
-
import com.vaadin.ui.CssLayout;
import com.vaadin.ui.declarative.Design;
-@Ignore
public class DesignReadInConstructor extends CssLayout {
public DesignReadInConstructor() {
diff --git a/server/tests/src/com/vaadin/tests/design/InvalidLayoutTemplate.java b/server/tests/src/com/vaadin/tests/design/InvalidLayoutTemplate.java
index bdfa4b47cc..8a2dec5a35 100644
--- a/server/tests/src/com/vaadin/tests/design/InvalidLayoutTemplate.java
+++ b/server/tests/src/com/vaadin/tests/design/InvalidLayoutTemplate.java
@@ -15,8 +15,6 @@
*/
package com.vaadin.tests.design;
-import org.junit.Ignore;
-
import com.vaadin.ui.Button;
import com.vaadin.ui.NativeButton;
import com.vaadin.ui.TextField;
@@ -27,7 +25,6 @@ import com.vaadin.ui.VerticalLayout;
* @since
* @author Vaadin Ltd
*/
-@Ignore
public class InvalidLayoutTemplate extends VerticalLayout {
private NativeButton firstButton;
private NativeButton secondButton;
diff --git a/server/tests/src/com/vaadin/tests/design/LayoutTemplate.java b/server/tests/src/com/vaadin/tests/design/LayoutTemplate.java
index 95f30fb728..fdfddf5c08 100644
--- a/server/tests/src/com/vaadin/tests/design/LayoutTemplate.java
+++ b/server/tests/src/com/vaadin/tests/design/LayoutTemplate.java
@@ -15,8 +15,6 @@
*/
package com.vaadin.tests.design;
-import org.junit.Ignore;
-
import com.vaadin.ui.Button;
import com.vaadin.ui.NativeButton;
import com.vaadin.ui.VerticalLayout;
@@ -27,7 +25,6 @@ import com.vaadin.ui.VerticalLayout;
* @since
* @author Vaadin Ltd
*/
-@Ignore
public class LayoutTemplate extends VerticalLayout {
private NativeButton firstButton; // assigned based on local id
private NativeButton secondButton; // assigned based on id
diff --git a/server/tests/src/com/vaadin/tests/design/TestLocale.java b/server/tests/src/com/vaadin/tests/design/LocaleTest.java
index a4100f7d71..939080fbbc 100644
--- a/server/tests/src/com/vaadin/tests/design/TestLocale.java
+++ b/server/tests/src/com/vaadin/tests/design/LocaleTest.java
@@ -32,6 +32,11 @@ import com.vaadin.ui.Label;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.declarative.Design;
import com.vaadin.ui.declarative.DesignContext;
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
/**
* Tests the handling of the locale property in parsing and html generation.
@@ -39,10 +44,10 @@ import com.vaadin.ui.declarative.DesignContext;
* @since
* @author Vaadin Ltd
*/
-public class TestLocale extends TestCase {
+public class LocaleTest {
DesignContext ctx;
- @Override
+ @Before
public void setUp() {
ctx = new DesignContext();
}
@@ -52,6 +57,7 @@ public class TestLocale extends TestCase {
* constructed, the result only contains locale attributes for a component
* if its locale differs from that of its parent.
*/
+ @Test
public void testHtmlGeneration() {
// create a component hierarchy
VerticalLayout vLayout = new VerticalLayout();
@@ -130,6 +136,7 @@ public class TestLocale extends TestCase {
* Checks that the locale of a component is set when the html element
* corresponding to the component specifies a locale.
*/
+ @Test
public void testParsing() {
// create an html document
Document doc = new Document("");
diff --git a/server/tests/src/com/vaadin/tests/design/ParseAllSupportedComponentsTest.java b/server/tests/src/com/vaadin/tests/design/ParseAllSupportedComponentsTest.java
index 4f3f205631..5f901cd746 100644
--- a/server/tests/src/com/vaadin/tests/design/ParseAllSupportedComponentsTest.java
+++ b/server/tests/src/com/vaadin/tests/design/ParseAllSupportedComponentsTest.java
@@ -22,26 +22,28 @@ import junit.framework.TestCase;
import com.vaadin.ui.declarative.Design;
import com.vaadin.ui.declarative.DesignContext;
+import org.junit.Test;
+
+import static org.hamcrest.CoreMatchers.*;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
/**
* Just top level test case that contains all synchronizable components
*
* @author Vaadin Ltd
*/
-public class ParseAllSupportedComponentsTest extends TestCase {
+public class ParseAllSupportedComponentsTest {
+
+ @Test
+ public void allComponentsAreParsed() throws FileNotFoundException {
+ DesignContext ctx = Design
+ .read(new FileInputStream(
+ "server/tests/src/com/vaadin/tests/design/all-components.html"),
+ null);
- public void testParsing() {
- try {
- DesignContext ctx = Design
- .read(new FileInputStream(
- "server/tests/src/com/vaadin/tests/design/all-components.html"),
- null);
- assertNotNull("The returned design context can not be null", ctx);
- assertNotNull("the component root can not be null",
- ctx.getRootComponent());
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- fail("Template parsing threw exception");
- }
+ assertThat(ctx, is(not(nullValue())));
+ assertThat(ctx.getRootComponent(), is(not(nullValue())));
}
}
diff --git a/server/tests/src/com/vaadin/tests/design/ParseLayoutTest.java b/server/tests/src/com/vaadin/tests/design/ParseLayoutTest.java
index c517b0e5e2..70376c79f8 100644
--- a/server/tests/src/com/vaadin/tests/design/ParseLayoutTest.java
+++ b/server/tests/src/com/vaadin/tests/design/ParseLayoutTest.java
@@ -22,25 +22,27 @@ import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
-import junit.framework.TestCase;
-
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.nodes.Node;
+import org.junit.Before;
import org.junit.Test;
-import com.vaadin.ui.Button;
import com.vaadin.ui.Component;
import com.vaadin.ui.HorizontalLayout;
-import com.vaadin.ui.Label;
-import com.vaadin.ui.NativeButton;
import com.vaadin.ui.TextArea;
import com.vaadin.ui.TextField;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.declarative.Design;
import com.vaadin.ui.declarative.DesignContext;
import com.vaadin.ui.declarative.DesignException;
+import org.junit.rules.ExpectedException;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.junit.Assert.*;
/**
* A test for checking that parsing a layout preserves the IDs and the mapping
@@ -50,45 +52,62 @@ import com.vaadin.ui.declarative.DesignException;
* @since
* @author Vaadin Ltd
*/
-public class ParseLayoutTest extends TestCase {
+public class ParseLayoutTest {
// The context is used for accessing the created component hierarchy.
private DesignContext ctx;
- @Override
- protected void setUp() throws Exception {
- super.setUp();
+ @Before
+ public void setUp() throws Exception {
ctx = Design
.read(new FileInputStream(
"server/tests/src/com/vaadin/tests/design/testFile.html"),
null);
}
- /*
- * Checks the component hierarchy created by parsing a design. Also checks
- * that components can be found by id and caption.
- */
@Test
- public void testGettingByIDAndCaption() throws FileNotFoundException {
- findElements(ctx);
- checkHierarchy(ctx);
- }
-
- /*
- * Check that captions, ids and package mappings are preserved when an html
- * tree is generated from a DesignContext containing the component root of
- * the component hierarchy. Done by writing the design to a string and then
- * reading it back, not using the original context information after reading
- * the written design. The mapping from prefixes to package names is checked
- * directly from the html tree.
- */
+ public void buttonWithIdIsParsed() {
+ Component button = ctx.getComponentByLocalId("firstButton");
+
+ assertThat(ctx.getComponentByCaption("Native click me"), is(button));
+ assertThat(button.getCaption(), is("Native click me"));
+ }
+
@Test
- public void testThatSerializationPreservesProperties() throws IOException {
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- Design.write(ctx, out);
- ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
- DesignContext newContext = Design.read(in, null);
- findElements(newContext);
- checkHierarchy(newContext);
+ public void buttonWithIdAndLocalIdIsParsed() {
+ Component button = ctx.getComponentById("secondButton");
+
+ assertThat(ctx.getComponentByCaption("Another button"), is(button));
+ assertThat(ctx.getComponentByLocalId("localID"), is(button));
+ assertThat(button.getCaption(), is("Another button"));
+ }
+
+ @Test
+ public void buttonWithoutIdsIsParsed() {
+ assertThat(ctx.getComponentByCaption("Yet another button"),
+ is(not(nullValue())));
+ }
+
+ @Test
+ public void serializationPreservesProperties() throws IOException {
+ ByteArrayOutputStream out = serializeDesign(ctx);
+ ctx = deSerializeDesign(out);
+
+ assertButtonProperties();
+ }
+
+ @Test
+ public void serializationPreservesHierarchy() throws IOException {
+ ByteArrayOutputStream out = serializeDesign(ctx);
+ ctx = deSerializeDesign(out);
+
+ assertComponentHierarchy();
+ }
+
+ @Test
+ public void designIsSerializedWithCorrectPrefixesAndPackageNames()
+ throws IOException {
+ ByteArrayOutputStream out = serializeDesign(ctx);
+
// Check the mapping from prefixes to package names using the html tree
String[] expectedPrefixes = { "my" };
String[] expectedPackageNames = { "com.addon.mypackage" };
@@ -114,13 +133,26 @@ public class ParseLayoutTest extends TestCase {
index);
}
- /*
- * Check that the field binding works if root instance with member fields is
- * passed to the LayoutHandler
- *
- * @throws IOException
- */
- public void testFieldBinding() throws IOException {
+ private DesignContext deSerializeDesign(ByteArrayOutputStream out) {
+ ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
+ return Design.read(in, null);
+ }
+
+ private ByteArrayOutputStream serializeDesign(DesignContext context) throws IOException {
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ Design.write(context, out);
+
+ return out;
+ }
+
+ private void assertButtonProperties() {
+ buttonWithIdAndLocalIdIsParsed();
+ buttonWithIdIsParsed();
+ buttonWithoutIdsIsParsed();
+ }
+
+ @Test
+ public void fieldsAreBoundToATemplate() throws IOException {
LayoutTemplate template = new LayoutTemplate();
InputStream htmlFile = new FileInputStream(
"server/tests/src/com/vaadin/tests/design/testFile.html");
@@ -132,92 +164,59 @@ public class ParseLayoutTest extends TestCase {
assertEquals("Native click me", template.getFirstButton().getCaption());
}
- /*
- * Check that the field binding fails if some of the fields in the root
- * instance were not bound
- *
- * @throws IOException
- */
- public void testUnboundFields() throws IOException {
+ @Test(expected = DesignException.class)
+ public void fieldsCannotBeBoundToAnInvalidTemplate() throws IOException {
InvalidLayoutTemplate template = new InvalidLayoutTemplate();
InputStream htmlFile = new FileInputStream(
"server/tests/src/com/vaadin/tests/design/testFile.html");
- try {
- Design.read(htmlFile, template);
- // we are expecting an exception
- fail();
- } catch (DesignException e) {
- // expected
- }
+
+ Design.read(htmlFile, template);
}
- /*
- * Checks that the correct components occur in the correct order in the
- * component hierarchy rooted at context.getComponentRoot().
- */
- private void checkHierarchy(DesignContext context) {
- Component root = context.getRootComponent();
+ @Test
+ public void rootHasCorrectComponents() {
+ Component root = ctx.getRootComponent();
+
VerticalLayout vlayout = (VerticalLayout) root;
- int numComponents = vlayout.getComponentCount();
- assertEquals("Wrong number of child components", 3, numComponents);
- // Check the contents of the horizontal layout
+ assertThat(vlayout.getComponentCount(), is(3));
+ }
+
+ @Test
+ public void rootChildHasCorrectComponents() {
+ Component root = ctx.getRootComponent();
+ VerticalLayout vlayout = (VerticalLayout) root;
HorizontalLayout hlayout = (HorizontalLayout) vlayout.getComponent(0);
- int numHLComponents = hlayout.getComponentCount();
- assertEquals(5, numHLComponents);
- Label label = (Label) hlayout.getComponent(0);
- assertEquals("Wrong caption.", "FooBar", label.getCaption());
- NativeButton nb = (NativeButton) hlayout.getComponent(1);
- assertEquals("Wrong caption.", "Native click me", nb.getCaption());
- nb = (NativeButton) hlayout.getComponent(2);
- assertEquals("Wrong caption.", "Another button", nb.getCaption());
- nb = (NativeButton) hlayout.getComponent(3);
- assertEquals("Wrong caption.", "Yet another button", nb.getCaption());
- Button b = (Button) hlayout.getComponent(4);
- assertEquals("Wrong caption.", "Click me", b.getCaption());
- assertEquals("Wrong width.", 150f, b.getWidth());
+
+ assertThat(hlayout.getComponentCount(), is(5));
+ assertThat(hlayout.getComponent(0).getCaption(), is("FooBar"));
+ assertThat(hlayout.getComponent(1).getCaption(), is("Native click me"));
+ assertThat(hlayout.getComponent(2).getCaption(), is("Another button"));
+ assertThat(hlayout.getComponent(3).getCaption(), is("Yet another button"));
+ assertThat(hlayout.getComponent(4).getCaption(), is("Click me"));
+ assertThat(hlayout.getComponent(4).getWidth(), is(150f));
// Check the remaining two components of the vertical layout
+ assertTextField(vlayout);
+ assertTextArea(vlayout);
+ }
+
+ private void assertComponentHierarchy() {
+ rootHasCorrectComponents();
+ rootChildHasCorrectComponents();
+ }
+
+ private void assertTextField(VerticalLayout vlayout) {
TextField tf = (TextField) vlayout.getComponent(1);
- assertEquals("Wrong caption.", "Text input", tf.getCaption());
- TextArea ta = (TextArea) vlayout.getComponent(2);
- assertEquals("Wrong caption.", "Text area", ta.getCaption());
- assertEquals("Wrong width.", 300f, ta.getWidth());
- assertEquals("Wrong height.", 200f, ta.getHeight());
- }
-
- /*
- * Checks that the correct elements are found using a local id, a global id
- * or a caption.
- */
- private void findElements(DesignContext designContext) {
- NativeButton firstButton = (NativeButton) designContext
- .getComponentByLocalId("firstButton");
- NativeButton firstButton_2 = (NativeButton) designContext
- .getComponentByCaption("Native click me");
- NativeButton secondButton = (NativeButton) designContext
- .getComponentById("secondButton");
- NativeButton secondButton_2 = (NativeButton) designContext
- .getComponentByLocalId("localID");
- NativeButton secondButton_3 = (NativeButton) designContext
- .getComponentByCaption("Another button");
- NativeButton thirdButton = (NativeButton) designContext
- .getComponentByCaption("Yet another button");
- // Check that the first button was found using both identifiers.
- assertEquals("The found buttons should be identical but they are not.",
- firstButton, firstButton_2);
- assertTrue("The found button element is incorrect.", firstButton
- .getCaption().equals("Native click me"));
- // Check that the second button was found using all three identifiers.
- assertEquals("The found buttons should be identical but they are not.",
- secondButton, secondButton_2);
- assertEquals("The found buttons should be identical but they are not.",
- secondButton_2, secondButton_3);
- assertTrue("The found button is incorrect.", secondButton.getCaption()
- .equals("Another button"));
- // Check that the third button was found by caption.
- assertTrue("The found button is incorrect.", thirdButton.getCaption()
- .equals("Yet another button"));
+
+ assertThat(tf.getCaption(), is("Text input"));
}
+ private void assertTextArea(VerticalLayout layout) {
+ TextArea ta = (TextArea) layout.getComponent(2);
+
+ assertThat(ta.getCaption(), is("Text area"));
+ assertThat(ta.getWidth(), is(300f));
+ assertThat(ta.getHeight(), is(200f));
+ }
}
diff --git a/server/tests/src/com/vaadin/tests/design/designroot/DesignWithAnnotation.java b/server/tests/src/com/vaadin/tests/design/designroot/DesignWithAnnotation.java
index 70809cb694..ef9de9dcb0 100644
--- a/server/tests/src/com/vaadin/tests/design/designroot/DesignWithAnnotation.java
+++ b/server/tests/src/com/vaadin/tests/design/designroot/DesignWithAnnotation.java
@@ -15,8 +15,6 @@
*/
package com.vaadin.tests.design.designroot;
-import org.junit.Ignore;
-
import com.vaadin.annotations.DesignRoot;
import com.vaadin.ui.Button;
import com.vaadin.ui.Label;
@@ -24,7 +22,6 @@ import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.declarative.Design;
@DesignRoot("DesignWithEmptyAnnotation.html")
-@Ignore
public class DesignWithAnnotation extends VerticalLayout {
public Button ok;
diff --git a/server/tests/src/com/vaadin/tests/design/designroot/DesignWithEmptyAnnotation.java b/server/tests/src/com/vaadin/tests/design/designroot/DesignWithEmptyAnnotation.java
index f6fb928e75..55fd571ee2 100644
--- a/server/tests/src/com/vaadin/tests/design/designroot/DesignWithEmptyAnnotation.java
+++ b/server/tests/src/com/vaadin/tests/design/designroot/DesignWithEmptyAnnotation.java
@@ -15,8 +15,6 @@
*/
package com.vaadin.tests.design.designroot;
-import org.junit.Ignore;
-
import com.vaadin.annotations.DesignRoot;
import com.vaadin.ui.Button;
import com.vaadin.ui.Label;
@@ -24,7 +22,6 @@ import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.declarative.Design;
@DesignRoot
-@Ignore
public class DesignWithEmptyAnnotation extends VerticalLayout {
protected Button ok;
diff --git a/server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithAnnotation.java b/server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithAnnotation.java
index 14e4269e80..d47b4540df 100644
--- a/server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithAnnotation.java
+++ b/server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithAnnotation.java
@@ -15,11 +15,8 @@
*/
package com.vaadin.tests.design.designroot;
-import org.junit.Ignore;
-
import com.vaadin.ui.TextField;
-@Ignore
public class ExtendedDesignWithAnnotation extends DesignWithAnnotation {
private TextField customField = new TextField();
diff --git a/server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotation.java b/server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotation.java
index 22865b098c..ea513f6d3e 100644
--- a/server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotation.java
+++ b/server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotation.java
@@ -15,14 +15,11 @@
*/
package com.vaadin.tests.design.designroot;
-import org.junit.Ignore;
-
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Button.ClickListener;
import com.vaadin.ui.Notification;
import com.vaadin.ui.TextField;
-@Ignore
public class ExtendedDesignWithEmptyAnnotation extends
DesignWithEmptyAnnotation {
diff --git a/server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotationUI.java b/server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotationUI.java
index 34f517d25d..1d0e8de4eb 100644
--- a/server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotationUI.java
+++ b/server/tests/src/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotationUI.java
@@ -15,12 +15,9 @@
*/
package com.vaadin.tests.design.designroot;
-import org.junit.Ignore;
-
import com.vaadin.server.VaadinRequest;
import com.vaadin.ui.UI;
-@Ignore
public class ExtendedDesignWithEmptyAnnotationUI extends UI {
@Override
diff --git a/server/tests/src/com/vaadin/tests/design/nested/MyChildDesign.java b/server/tests/src/com/vaadin/tests/design/nested/MyChildDesign.java
index e85c0aca5f..3b0d80c32c 100644
--- a/server/tests/src/com/vaadin/tests/design/nested/MyChildDesign.java
+++ b/server/tests/src/com/vaadin/tests/design/nested/MyChildDesign.java
@@ -15,8 +15,6 @@
*/
package com.vaadin.tests.design.nested;
-import org.junit.Ignore;
-
import com.vaadin.annotations.DesignRoot;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
@@ -27,7 +25,6 @@ import com.vaadin.ui.declarative.Design;
*
* @author Vaadin Ltd
*/
-@Ignore
@DesignRoot("mychilddesign.html")
public class MyChildDesign extends HorizontalLayout {
public Label childLabel;
diff --git a/server/tests/src/com/vaadin/tests/design/nested/MyChildDesignCustomComponent.java b/server/tests/src/com/vaadin/tests/design/nested/MyChildDesignCustomComponent.java
index 94e34baea2..8402224cf9 100644
--- a/server/tests/src/com/vaadin/tests/design/nested/MyChildDesignCustomComponent.java
+++ b/server/tests/src/com/vaadin/tests/design/nested/MyChildDesignCustomComponent.java
@@ -15,11 +15,8 @@
*/
package com.vaadin.tests.design.nested;
-import org.junit.Ignore;
-
import com.vaadin.ui.Button;
-@Ignore
public class MyChildDesignCustomComponent extends Button {
}
diff --git a/server/tests/src/com/vaadin/tests/design/nested/MyDesignRoot.java b/server/tests/src/com/vaadin/tests/design/nested/MyDesignRoot.java
index 5727322ce3..abde002ef8 100644
--- a/server/tests/src/com/vaadin/tests/design/nested/MyDesignRoot.java
+++ b/server/tests/src/com/vaadin/tests/design/nested/MyDesignRoot.java
@@ -15,8 +15,6 @@
*/
package com.vaadin.tests.design.nested;
-import org.junit.Ignore;
-
import com.vaadin.annotations.DesignRoot;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.declarative.Design;
@@ -26,7 +24,6 @@ import com.vaadin.ui.declarative.Design;
*
* @author Vaadin Ltd
*/
-@Ignore
@DesignRoot("mydesignroot.html")
public class MyDesignRoot extends VerticalLayout {
// should be assigned automatically
diff --git a/server/tests/src/com/vaadin/tests/design/nested/MyExtendedChildDesign.java b/server/tests/src/com/vaadin/tests/design/nested/MyExtendedChildDesign.java
index 2012e4ec14..579fdfb869 100644
--- a/server/tests/src/com/vaadin/tests/design/nested/MyExtendedChildDesign.java
+++ b/server/tests/src/com/vaadin/tests/design/nested/MyExtendedChildDesign.java
@@ -15,9 +15,6 @@
*/
package com.vaadin.tests.design.nested;
-import org.junit.Ignore;
-
-@Ignore
public class MyExtendedChildDesign extends MyChildDesign {
public MyExtendedChildDesign() {
super();
diff --git a/server/tests/src/com/vaadin/tests/design/nested/TestNestedCustomLayouts.java b/server/tests/src/com/vaadin/tests/design/nested/NestedCustomLayoutsTest.java
index c71ccca85b..beaa9519cb 100644
--- a/server/tests/src/com/vaadin/tests/design/nested/TestNestedCustomLayouts.java
+++ b/server/tests/src/com/vaadin/tests/design/nested/NestedCustomLayoutsTest.java
@@ -15,29 +15,20 @@
*/
package com.vaadin.tests.design.nested;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-
-import junit.framework.TestCase;
-
+import com.vaadin.tests.design.nested.customlayouts.*;
+import com.vaadin.ui.VerticalLayout;
+import com.vaadin.ui.declarative.Design;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.junit.Test;
-import com.vaadin.tests.design.nested.customlayouts.CustomAbsoluteLayout;
-import com.vaadin.tests.design.nested.customlayouts.CustomAccordion;
-import com.vaadin.tests.design.nested.customlayouts.CustomCssLayout;
-import com.vaadin.tests.design.nested.customlayouts.CustomFormLayout;
-import com.vaadin.tests.design.nested.customlayouts.CustomGridLayout;
-import com.vaadin.tests.design.nested.customlayouts.CustomHorizontalLayout;
-import com.vaadin.tests.design.nested.customlayouts.CustomHorizontalSplitPanel;
-import com.vaadin.tests.design.nested.customlayouts.CustomPanel;
-import com.vaadin.tests.design.nested.customlayouts.CustomTabSheet;
-import com.vaadin.tests.design.nested.customlayouts.CustomVerticalLayout;
-import com.vaadin.tests.design.nested.customlayouts.CustomVerticalSplitPanel;
-import com.vaadin.ui.VerticalLayout;
-import com.vaadin.ui.declarative.Design;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.greaterThan;
/**
* Test case for nested custom layouts. The children of the custom layouts must
@@ -45,12 +36,24 @@ import com.vaadin.ui.declarative.Design;
*
* @author Vaadin Ltd
*/
-public class TestNestedCustomLayouts extends TestCase {
+public class NestedCustomLayoutsTest {
private static String PACKAGE_MAPPING = "com_vaadin_tests_design_nested_customlayouts:com.vaadin.tests.design.nested.customlayouts";
@Test
public void testNestedLayouts() throws IOException {
+ VerticalLayout rootLayout = createRootLayout();
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+
+ Design.write(rootLayout, out);
+ Document doc = Jsoup.parse(out.toString("UTF-8"));
+
+ assertThat(doc.head().child(0).attr("name"), is("package-mapping"));
+ assertThat(doc.head().child(0).attr("content"), is(PACKAGE_MAPPING));
+ assertChildrenCount(doc);
+ }
+
+ private VerticalLayout createRootLayout() {
VerticalLayout rootLayout = new VerticalLayout();
rootLayout.addComponent(new CustomAbsoluteLayout());
rootLayout.addComponent(new CustomAccordion());
@@ -63,18 +66,17 @@ public class TestNestedCustomLayouts extends TestCase {
rootLayout.addComponent(new CustomTabSheet());
rootLayout.addComponent(new CustomVerticalLayout());
rootLayout.addComponent(new CustomVerticalSplitPanel());
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- Design.write(rootLayout, out);
- Document doc = Jsoup.parse(out.toString("UTF-8"));
- assertEquals("package-mapping", doc.head().child(0).attr("name"));
- assertEquals(PACKAGE_MAPPING, doc.head().child(0).attr("content"));
+
+ return rootLayout;
+ }
+
+ private void assertChildrenCount(Document doc) {
Element rootNode = doc.body().child(0);
- assertTrue("Root node must have children",
- rootNode.children().size() > 0);
+ assertThat(rootNode.children().size(), greaterThan(0));
+
for (Element child : rootNode.children()) {
// make sure that the nested custom layouts do not render children
- assertEquals("Child nodes must not have children", 0, child
- .children().size());
+ assertThat(child.children().size(), is(0));
}
}
}
diff --git a/server/tests/src/com/vaadin/tests/design/nested/ReadNestedTemplatesTest.java b/server/tests/src/com/vaadin/tests/design/nested/ReadNestedTemplatesTest.java
new file mode 100644
index 0000000000..dc95306cd3
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/design/nested/ReadNestedTemplatesTest.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2000-2014 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.design.nested;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.hamcrest.core.IsNot.not;
+import static org.junit.Assert.*;
+
+/**
+ * Test case for reading nested templates
+ *
+ * @since
+ * @author Vaadin Ltd
+ */
+public class ReadNestedTemplatesTest {
+
+ private MyDesignRoot root;
+
+ @Before
+ public void setUp() {
+ root = new MyDesignRoot();
+ }
+
+ @Test
+ public void rootContainsOneChild() {
+ assertThat(root.getComponentCount(), is(1));
+ assertThat(root.iterator().next(),
+ instanceOf(MyExtendedChildDesign.class));
+ }
+
+ @Test
+ public void rootContainsTwoGrandChildren() {
+ assertThat(root.childDesign.getComponentCount(), is(2));
+ }
+
+ @Test
+ public void childComponentIsNotNull() {
+ assertThat(root.childDesign, is(not(nullValue())));
+ }
+
+ @Test
+ public void childLabelIsNotNull() {
+ assertThat(root.childDesign.childLabel, is(not(nullValue())));
+ assertThat(root.childDesign.childLabel.getValue(), is("test content"));
+ }
+
+ @Test
+ public void childCustomComponentsIsNotNull() {
+ assertThat(root.childDesign.childCustomComponent, is(not(nullValue())));
+ assertThat(root.childDesign.childCustomComponent.getCaption(),
+ is("custom content"));
+ }
+}
diff --git a/server/tests/src/com/vaadin/tests/design/nested/TestReadNestedTemplates.java b/server/tests/src/com/vaadin/tests/design/nested/TestReadNestedTemplates.java
deleted file mode 100644
index c1483adc8a..0000000000
--- a/server/tests/src/com/vaadin/tests/design/nested/TestReadNestedTemplates.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright 2000-2014 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.design.nested;
-
-import junit.framework.TestCase;
-
-/**
- * Test case for reading nested templates
- *
- * @since
- * @author Vaadin Ltd
- */
-public class TestReadNestedTemplates extends TestCase {
-
- private MyDesignRoot root;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- root = new MyDesignRoot();
- }
-
- public void testChildren() {
- assertEquals("The root layout must contain one child", 1,
- root.getComponentCount());
- assertTrue(root.iterator().next() instanceof MyExtendedChildDesign);
- }
-
- public void testGrandChildren() {
- assertEquals("The root layout must have two grandchildren", 2,
- root.childDesign.getComponentCount());
- }
-
- public void testRootComponentFields() {
- assertNotNull("The child component must not be null", root.childDesign);
- }
-
- public void testChildComponentFields() {
- assertNotNull("Grandchildren must not be null",
- root.childDesign.childLabel);
- assertNotNull("Grandchildren must not be null",
- root.childDesign.childCustomComponent);
- assertEquals("child label caption must be read", "test content",
- root.childDesign.childLabel.getValue());
- assertEquals("child custom component caption must be read",
- "custom content",
- root.childDesign.childCustomComponent.getCaption());
- }
-}
diff --git a/server/tests/src/com/vaadin/tests/design/nested/TestWriteNestedTemplates.java b/server/tests/src/com/vaadin/tests/design/nested/WriteNestedTemplatesTest.java
index 7fe63baa73..344cd94ac2 100644
--- a/server/tests/src/com/vaadin/tests/design/nested/TestWriteNestedTemplates.java
+++ b/server/tests/src/com/vaadin/tests/design/nested/WriteNestedTemplatesTest.java
@@ -15,13 +15,15 @@
*/
package com.vaadin.tests.design.nested;
-import junit.framework.TestCase;
-
+import com.vaadin.ui.declarative.DesignContext;
import org.jsoup.nodes.Attributes;
import org.jsoup.nodes.Element;
import org.jsoup.parser.Tag;
+import org.junit.Before;
+import org.junit.Test;
-import com.vaadin.ui.declarative.DesignContext;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.*;
/**
*
@@ -29,21 +31,29 @@ import com.vaadin.ui.declarative.DesignContext;
*
* @author Vaadin Ltd
*/
-public class TestWriteNestedTemplates extends TestCase {
+public class WriteNestedTemplatesTest {
private MyDesignRoot root;
private Element design;
- @Override
- protected void setUp() throws Exception {
- super.setUp();
+ @Before
+ public void setUp() {
root = new MyDesignRoot();
design = createDesign();
+ }
+
+ private Element createDesign() {
+ Element design = new Element(Tag.valueOf("v-vertical-layout"), "",
+ new Attributes());
+
DesignContext designContext = new DesignContext();
designContext.setRootComponent(root);
root.writeDesign(design, designContext);
+
+ return design;
}
+ @Test
public void testChildRendered() {
assertEquals("Root layout must have one child", 1, design.children()
.size());
@@ -51,39 +61,29 @@ public class TestWriteNestedTemplates extends TestCase {
design.child(0).tagName());
}
- public void testRootCaptionWritten() {
- assertTrue("Root layout caption must be written",
- design.hasAttr("caption"));
- assertEquals("Root layout caption must be written", "root caption",
- design.attr("caption"));
+ @Test
+ public void rootCaptionIsWritten() {
+ assertTrue(design.hasAttr("caption"));
+ assertThat(design.attr("caption"), is("root caption"));
}
- public void testChildCaptionWritten() {
- assertTrue("Child design caption must be written", design.child(0)
- .hasAttr("caption"));
- assertEquals("Child design caption must be written", "child caption",
- design.child(0).attr("caption"));
+ @Test
+ public void childCaptionIsWritten() {
+ assertTrue(design.child(0).hasAttr("caption"));
+ assertThat(design.child(0).attr("caption"), is("child caption"));
}
// The default caption is read from child template
- public void testDefaultCaptionShouldNotBeWritten() {
- design = createDesign();
+ @Test
+ public void defaultCaptionIsNotOverwritten() {
root.childDesign.setCaption("Default caption for child design");
- DesignContext designContext = new DesignContext();
- designContext.setRootComponent(root);
- root.writeDesign(design, designContext);
- assertFalse("Default caption must not be written", design.child(0)
- .hasAttr("caption"));
- }
+ design = createDesign();
- public void testChildDesignChildrenNotWrittenInRootTemplate() {
- assertEquals(
- "Children of the child template must not be written to root template",
- 0, design.child(0).children().size());
+ assertFalse(design.child(0).hasAttr("caption"));
}
- private Element createDesign() {
- return new Element(Tag.valueOf("v-vertical-layout"), "",
- new Attributes());
+ @Test
+ public void childDesignChildrenIsNotWrittenInRootTemplate() {
+ assertThat(design.child(0).children().size(), is(0));
}
}
diff --git a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomAbsoluteLayout.java b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomAbsoluteLayout.java
index ed2b27215e..8eef3b07a6 100644
--- a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomAbsoluteLayout.java
+++ b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomAbsoluteLayout.java
@@ -15,15 +15,12 @@
*/
package com.vaadin.tests.design.nested.customlayouts;
-import org.junit.Ignore;
-
import com.vaadin.ui.AbsoluteLayout;
import com.vaadin.ui.Label;
/**
* @author Vaadin Ltd
*/
-@Ignore
public class CustomAbsoluteLayout extends AbsoluteLayout {
public CustomAbsoluteLayout() {
this.addComponent(new Label());
diff --git a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomAccordion.java b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomAccordion.java
index 7d45917520..93606f296c 100644
--- a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomAccordion.java
+++ b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomAccordion.java
@@ -15,15 +15,12 @@
*/
package com.vaadin.tests.design.nested.customlayouts;
-import org.junit.Ignore;
-
import com.vaadin.ui.Accordion;
import com.vaadin.ui.Label;
/**
* @author Vaadin Ltd
*/
-@Ignore
public class CustomAccordion extends Accordion {
public CustomAccordion() {
addComponent(new Label());
diff --git a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomCssLayout.java b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomCssLayout.java
index 328a025e01..b2aaa2c015 100644
--- a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomCssLayout.java
+++ b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomCssLayout.java
@@ -15,15 +15,12 @@
*/
package com.vaadin.tests.design.nested.customlayouts;
-import org.junit.Ignore;
-
import com.vaadin.ui.CssLayout;
import com.vaadin.ui.Label;
/**
* @author Vaadin Ltd
*/
-@Ignore
public class CustomCssLayout extends CssLayout {
public CustomCssLayout() {
this.addComponent(new Label());
diff --git a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomFormLayout.java b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomFormLayout.java
index 179b195926..66ac083c0d 100644
--- a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomFormLayout.java
+++ b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomFormLayout.java
@@ -15,15 +15,12 @@
*/
package com.vaadin.tests.design.nested.customlayouts;
-import org.junit.Ignore;
-
import com.vaadin.ui.FormLayout;
import com.vaadin.ui.Label;
/**
* @author Vaadin Ltd
*/
-@Ignore
public class CustomFormLayout extends FormLayout {
public CustomFormLayout() {
this.addComponent(new Label());
diff --git a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomGridLayout.java b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomGridLayout.java
index 0b3b90ca1f..1059ea0e14 100644
--- a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomGridLayout.java
+++ b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomGridLayout.java
@@ -15,15 +15,12 @@
*/
package com.vaadin.tests.design.nested.customlayouts;
-import org.junit.Ignore;
-
import com.vaadin.ui.GridLayout;
import com.vaadin.ui.Label;
/**
* @author Vaadin Ltd
*/
-@Ignore
public class CustomGridLayout extends GridLayout {
public CustomGridLayout() {
this.addComponent(new Label());
diff --git a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomHorizontalLayout.java b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomHorizontalLayout.java
index b742f7c629..482a9feb95 100644
--- a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomHorizontalLayout.java
+++ b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomHorizontalLayout.java
@@ -15,15 +15,12 @@
*/
package com.vaadin.tests.design.nested.customlayouts;
-import org.junit.Ignore;
-
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
/**
* @author Vaadin Ltd
*/
-@Ignore
public class CustomHorizontalLayout extends HorizontalLayout {
public CustomHorizontalLayout() {
this.addComponent(new Label());
diff --git a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomHorizontalSplitPanel.java b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomHorizontalSplitPanel.java
index deeb311858..21c8745796 100644
--- a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomHorizontalSplitPanel.java
+++ b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomHorizontalSplitPanel.java
@@ -15,15 +15,12 @@
*/
package com.vaadin.tests.design.nested.customlayouts;
-import org.junit.Ignore;
-
import com.vaadin.ui.HorizontalSplitPanel;
import com.vaadin.ui.Label;
/**
* @author Vaadin Ltd
*/
-@Ignore
public class CustomHorizontalSplitPanel extends HorizontalSplitPanel {
public CustomHorizontalSplitPanel() {
addComponent(new Label());
diff --git a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomPanel.java b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomPanel.java
index fa7827bdfd..5841fbcfee 100644
--- a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomPanel.java
+++ b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomPanel.java
@@ -15,15 +15,12 @@
*/
package com.vaadin.tests.design.nested.customlayouts;
-import org.junit.Ignore;
-
import com.vaadin.ui.Label;
import com.vaadin.ui.Panel;
/**
* @author Vaadin Ltd
*/
-@Ignore
public class CustomPanel extends Panel {
public CustomPanel() {
setContent(new Label());
diff --git a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomTabSheet.java b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomTabSheet.java
index 6298b67727..128de7de1f 100644
--- a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomTabSheet.java
+++ b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomTabSheet.java
@@ -15,15 +15,12 @@
*/
package com.vaadin.tests.design.nested.customlayouts;
-import org.junit.Ignore;
-
import com.vaadin.ui.Label;
import com.vaadin.ui.TabSheet;
/**
* @author Vaadin Ltd
*/
-@Ignore
public class CustomTabSheet extends TabSheet {
public CustomTabSheet() {
addComponent(new Label());
diff --git a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomVerticalLayout.java b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomVerticalLayout.java
index 7859ae0227..3bc8fba7de 100644
--- a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomVerticalLayout.java
+++ b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomVerticalLayout.java
@@ -15,15 +15,12 @@
*/
package com.vaadin.tests.design.nested.customlayouts;
-import org.junit.Ignore;
-
import com.vaadin.ui.Label;
import com.vaadin.ui.VerticalLayout;
/**
* @author Vaadin Ltd
*/
-@Ignore
public class CustomVerticalLayout extends VerticalLayout {
public CustomVerticalLayout() {
this.addComponent(new Label());
diff --git a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomVerticalSplitPanel.java b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomVerticalSplitPanel.java
index f6eb460c1b..486d71ea75 100644
--- a/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomVerticalSplitPanel.java
+++ b/server/tests/src/com/vaadin/tests/design/nested/customlayouts/CustomVerticalSplitPanel.java
@@ -15,15 +15,12 @@
*/
package com.vaadin.tests.design.nested.customlayouts;
-import org.junit.Ignore;
-
import com.vaadin.ui.Label;
import com.vaadin.ui.VerticalSplitPanel;
/**
* @author Vaadin Ltd
*/
-@Ignore
public class CustomVerticalSplitPanel extends VerticalSplitPanel {
public CustomVerticalSplitPanel() {
addComponent(new Label());