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());
// 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()
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
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 {
Iterator<Component> iter = tabSheet.getComponentIterator();
assertEquals(c, iter.next());
- assertEquals(false, iter.hasNext());
+ Assert.assertFalse(iter.hasNext());
assertNotNull(tabSheet.getTab(c));
}
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());
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)));
}