Package org.primefaces.component.selectcheckboxmenu

Examples of org.primefaces.component.selectcheckboxmenu.SelectCheckboxMenu


        TEST1, TEST2, TEST3
    };

    @Test
    public void testGetAsObject() {
        UIComponent component = new SelectCheckboxMenu();
        component.getAttributes().put(EnumConverter.ATTRIBUTE_ENUM_TYPE, TestEnum.class);

        EnumConverter converter = new EnumConverter();
        Assert.assertEquals(TestEnum.TEST1, converter.getAsObject(null, component, "TEST1"));
        Assert.assertEquals(TestEnum.TEST2, converter.getAsObject(null, component, "TEST2"));
        Assert.assertEquals(TestEnum.TEST3, converter.getAsObject(null, component, "TEST3"));
View Full Code Here


    }

    @Test
    public void testGetAsString() {
        UIComponent component = new SelectCheckboxMenu();
        EnumConverter converter = new EnumConverter();
        Assert.assertEquals("TEST1", converter.getAsString(null, component, TestEnum.TEST1));
        Assert.assertEquals("TEST2", converter.getAsString(null, component, TestEnum.TEST2));
        Assert.assertEquals("TEST3", converter.getAsString(null, component, TestEnum.TEST3));
    }
View Full Code Here

        Assert.assertEquals("TEST3", converter.getAsString(null, component, TestEnum.TEST3));
    }

    @Test(expected = ConverterException.class)
    public void testGetAsStringNotEnumException() {
        UIComponent component = new SelectCheckboxMenu();
        EnumConverter converter = new EnumConverter();
        converter.getAsString(null, component, new Object());
    }
View Full Code Here

        converter.getAsString(null, component, new Object());
    }
   
    @Test
    public void testGetAsStringEmptyAndNullValue() {
        UIComponent component = new SelectCheckboxMenu();
        EnumConverter converter = new EnumConverter();
        Assert.assertEquals("", converter.getAsString(null, component, ""));
        Assert.assertEquals("", converter.getAsString(null, component, null));
    }
View Full Code Here

*/
public class EntityConverterTest {

    @Test
    public void testGetAsObject() {
        UIComponent component = new SelectCheckboxMenu();

        EntityConverter converter = new EntityConverter();
        converter.setVariableTypeService(new DummyVariableService());
        Assert.assertEquals(Long.valueOf(109), ((TestEntity)converter.getAsObject(null, component, "109_${package}.domain.TestEntity")).getId());

View Full Code Here

        TEST1, TEST2, TEST3
    };

    @Test
    public void testGetAsObject() {
        UIComponent component = new SelectCheckboxMenu();
        component.getAttributes().put(EnumConverter.ATTRIBUTE_ENUM_TYPE, TestEnum.class);

        EnumConverter converter = new EnumConverter();
        Assert.assertEquals(TestEnum.TEST1, converter.getAsObject(null, component, "TEST1"));
        Assert.assertEquals(TestEnum.TEST2, converter.getAsObject(null, component, "TEST2"));
        Assert.assertEquals(TestEnum.TEST3, converter.getAsObject(null, component, "TEST3"));
View Full Code Here

    }

    @Test
    public void testGetAsString() {
        UIComponent component = new SelectCheckboxMenu();
        EnumConverter converter = new EnumConverter();
        Assert.assertEquals("TEST1", converter.getAsString(null, component, TestEnum.TEST1));
        Assert.assertEquals("TEST2", converter.getAsString(null, component, TestEnum.TEST2));
        Assert.assertEquals("TEST3", converter.getAsString(null, component, TestEnum.TEST3));
    }
View Full Code Here

        Assert.assertEquals("TEST3", converter.getAsString(null, component, TestEnum.TEST3));
    }

    @Test(expected = ConverterException.class)
    public void testGetAsStringNotEnumException() {
        UIComponent component = new SelectCheckboxMenu();
        EnumConverter converter = new EnumConverter();
        converter.getAsString(null, component, new Object());
    }
View Full Code Here

        converter.getAsString(null, component, new Object());
    }
   
    @Test
    public void testGetAsStringEmptyAndNullValue() {
        UIComponent component = new SelectCheckboxMenu();
        EnumConverter converter = new EnumConverter();
        Assert.assertEquals("", converter.getAsString(null, component, ""));
        Assert.assertEquals("", converter.getAsString(null, component, null));
    }
View Full Code Here

*/
public class EntityConverterTest {

    @Test
    public void testGetAsObject() {
        UIComponent component = new SelectCheckboxMenu();

        EntityConverter converter = new EntityConverter();
        converter.setVariableTypeService(new DummyVariableService());
        Assert.assertEquals(Long.valueOf(109), ((TestEntity)converter.getAsObject(null, component, "109_org.happyfaces.domain.TestEntity")).getId());

View Full Code Here

TOP

Related Classes of org.primefaces.component.selectcheckboxmenu.SelectCheckboxMenu

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.