aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPer-Åke Minborg <minborg@speedment.com>2016-10-28 09:57:32 -0700
committerHenri Sara <hesara@vaadin.com>2016-11-05 03:13:45 +0200
commitd75b3a6380279bc04b764329cf9b8ccb486c430d (patch)
treec6812d75b7655ee6425baeb7e6add11ecb88f0c1
parent6d9052749fe3334026b76e395882f56a63a060e7 (diff)
downloadvaadin-framework-d75b3a6380279bc04b764329cf9b8ccb486c430d.tar.gz
vaadin-framework-d75b3a6380279bc04b764329cf9b8ccb486c430d.zip
Replace assertEquals(true|false,) with assert(True|False)
Change-Id: I80b73b653e97904605dc62484a7448f3bfbf7224
-rw-r--r--server/src/test/java/com/vaadin/server/VaadinServletConfigurationTest.java8
-rw-r--r--server/src/test/java/com/vaadin/tests/design/DesignFormatterTest.java18
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/tabsheet/TabSheetTest.java13
3 files changed, 20 insertions, 19 deletions
diff --git a/server/src/test/java/com/vaadin/server/VaadinServletConfigurationTest.java b/server/src/test/java/com/vaadin/server/VaadinServletConfigurationTest.java
index 3b711c8c16..bc13afa4fd 100644
--- a/server/src/test/java/com/vaadin/server/VaadinServletConfigurationTest.java
+++ b/server/src/test/java/com/vaadin/server/VaadinServletConfigurationTest.java
@@ -53,8 +53,8 @@ public class VaadinServletConfigurationTest {
DeploymentConfiguration configuration = servlet.getService()
.getDeploymentConfiguration();
- Assert.assertEquals(true, configuration.isProductionMode());
- Assert.assertEquals(true, configuration.isCloseIdleSessions());
+ Assert.assertTrue(configuration.isProductionMode());
+ Assert.assertTrue(configuration.isCloseIdleSessions());
Assert.assertEquals(1234, configuration.getHeartbeatInterval());
Assert.assertEquals(4321, configuration.getResourceCacheTime());
@@ -78,10 +78,10 @@ public class VaadinServletConfigurationTest {
// Values from servlet init params take precedence
Assert.assertEquals(1111, configuration.getHeartbeatInterval());
- Assert.assertEquals(false, configuration.isProductionMode());
+ Assert.assertFalse(configuration.isProductionMode());
// Other params are as defined in the annotation
- Assert.assertEquals(true, configuration.isCloseIdleSessions());
+ Assert.assertTrue(configuration.isCloseIdleSessions());
Assert.assertEquals(4321, configuration.getResourceCacheTime());
Class<? extends UI> uiClass = new DefaultUIProvider()
diff --git a/server/src/test/java/com/vaadin/tests/design/DesignFormatterTest.java b/server/src/test/java/com/vaadin/tests/design/DesignFormatterTest.java
index 6b7ba963cc..30c07ccb11 100644
--- a/server/src/test/java/com/vaadin/tests/design/DesignFormatterTest.java
+++ b/server/src/test/java/com/vaadin/tests/design/DesignFormatterTest.java
@@ -80,15 +80,15 @@ public class DesignFormatterTest {
assertEquals("", formatter.format(true));
assertEquals("false", formatter.format(false));
- assertEquals(true, formatter.parse("true", boolean.class));
- assertEquals(true, formatter.parse("foobar", boolean.class));
- assertEquals(true, formatter.parse("", boolean.class));
- assertEquals(false, formatter.parse("false", boolean.class));
-
- assertEquals(true, formatter.parse("true", Boolean.class));
- assertEquals(true, formatter.parse("foobar", Boolean.class));
- assertEquals(true, formatter.parse("", Boolean.class));
- assertEquals(false, formatter.parse("false", Boolean.class));
+ Assert.assertTrue(formatter.parse("true", boolean.class));
+ Assert.assertTrue(formatter.parse("foobar", boolean.class));
+ Assert.assertTrue(formatter.parse("", boolean.class));
+ Assert.assertFalse(formatter.parse("false", boolean.class));
+
+ Assert.assertTrue(formatter.parse("true", Boolean.class));
+ Assert.assertTrue(formatter.parse("foobar", Boolean.class));
+ Assert.assertTrue(formatter.parse("", Boolean.class));
+ Assert.assertFalse(formatter.parse("false", Boolean.class));
}
@Test
diff --git a/server/src/test/java/com/vaadin/tests/server/component/tabsheet/TabSheetTest.java b/server/src/test/java/com/vaadin/tests/server/component/tabsheet/TabSheetTest.java
index 0b526541c2..60ec97ad50 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/tabsheet/TabSheetTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/tabsheet/TabSheetTest.java
@@ -15,6 +15,7 @@ import com.vaadin.ui.TabSheet;
import com.vaadin.ui.TabSheet.SelectedTabChangeEvent;
import com.vaadin.ui.TabSheet.SelectedTabChangeListener;
import com.vaadin.ui.TabSheet.Tab;
+import org.junit.Assert;
public class TabSheetTest {
@@ -28,7 +29,7 @@ public class TabSheetTest {
Iterator<Component> iter = tabSheet.getComponentIterator();
assertEquals(c, iter.next());
- assertEquals(false, iter.hasNext());
+ Assert.assertFalse(iter.hasNext());
assertNotNull(tabSheet.getTab(c));
}
@@ -200,10 +201,10 @@ public class TabSheetTest {
tabSheet.replaceComponent(lbl1, lbl2);
assertSame(tab1, tabSheet.getTab(lbl1));
assertSame(tab2, tabSheet.getTab(lbl2));
- assertEquals(false, tab1.isClosable());
- assertEquals(true, tab2.isClosable());
- assertEquals(false, tab1.isEnabled());
- assertEquals(true, tab2.isEnabled());
+ Assert.assertFalse(tab1.isClosable());
+ Assert.assertTrue(tab2.isClosable());
+ Assert.assertFalse(tab1.isEnabled());
+ Assert.assertTrue(tab2.isEnabled());
assertEquals("description", tab1.getDescription());
assertEquals(null, tab2.getDescription());
assertEquals(3, tabSheet.getComponentCount());
@@ -219,7 +220,7 @@ public class TabSheetTest {
assertNull(tabSheet.getTab(lbl1));
assertNull(tab1.getComponent());
assertNotNull(tabSheet.getTab(lbl3));
- assertEquals(false, tabSheet.getTab(lbl3).isEnabled());
+ Assert.assertFalse(tabSheet.getTab(lbl3).isEnabled());
assertEquals("description", tab1.getDescription());
assertEquals(1, tabSheet.getTabPosition(tabSheet.getTab(lbl3)));
}