@Test public void testCreateUISelectOneWithShortName() throws Exception { UISelectOne<String> input = factory.createSelectOne("foo", 'f', String.class); Assert.assertNotNull(input); Assert.assertTrue(input.hasFacet(HintsFacet.class)); Assert.assertEquals('f', input.getShortName()); }
@Test public void testCreateUISelectOneDefaultValue() throws Exception { UISelectOne<String> input = factory.createSelectOne("foo", 'f', String.class); Assert.assertNotNull(input); input.setDefaultValue((String) null); Assert.assertFalse(input.hasDefaultValue()); }
@Test public void testCreateUISelectOne() throws Exception { UISelectOne<String> input = factory.createSelectOne("foo", String.class); Assert.assertNotNull(input); Assert.assertTrue(input.hasFacet(HintsFacet.class)); Assert.assertEquals(InputComponents.DEFAULT_SHORT_NAME, input.getShortName()); }