Package com.dooapp.fxform.filter

Examples of com.dooapp.fxform.filter.ExcludeFilter


    @Test
    public void testMultipleBeanSourceWithExcludeFilter() throws IllegalArgumentException {
        FXForm fxForm = new FXForm();
        Bean1 bean1 = new Bean1();
        Bean2 bean2 = new Bean2();
        fxForm.getFilters().add(new ExcludeFilter(bean1.getClass().getName() + "-property"));
        fxForm.setSource(new MultipleBeanSource(bean1, bean2));
        Assert.assertEquals(2, fxForm.getFilteredElements().size());
        Assert.assertEquals(fxForm.getFilteredElements().get(0).getDeclaringClass(), Bean2.class);
        Assert.assertEquals(fxForm.getFilteredElements().get(1).getDeclaringClass(), Bean2.class);
    }
View Full Code Here


    @Test
    public void testMultipleBeanSourceWithIncludeAndExcludeFilter() throws IllegalArgumentException {
        FXForm fxForm = new FXForm();
        Bean1 bean1 = new Bean1();
        Bean2 bean2 = new Bean2();
        fxForm.getFilters().addAll(new ExcludeFilter(bean1.getClass().getName() + "-property"),
                new IncludeFilter(bean2.getClass().getName() + "-property"));
        fxForm.setSource(new MultipleBeanSource(bean1, bean2));
        Assert.assertEquals(1, fxForm.getFilteredElements().size());
        Assert.assertEquals(fxForm.getFilteredElements().get(0).getDeclaringClass(), Bean2.class);
    }
View Full Code Here

    @Test
    public void testIssue8() {
        FXForm fxForm = new FXForm();
        fxForm.setSkin(FXFormSkinFactory.INLINE_FACTORY.createSkin(fxForm));
        fxForm.setSource(new TestBean());
        fxForm.getFilters().add(new ExcludeFilter("stringProperty", "objectProperty"));
        fxForm.setSource(null);
        org.junit.Assert.assertEquals(0, fxForm.getElements().size());
    }
View Full Code Here

        Field field = AbstractFXForm.class.getDeclaredField("controllers");
        field.setAccessible(true);
        MapProperty<Element, ElementController> controllers = (MapProperty<Element, ElementController>) field.get(fxForm);

        Assert.assertEquals(2, controllers.size());
        fxForm.addFilters(new ExcludeFilter("age"));
        Assert.assertEquals(1, controllers.size());
    }
View Full Code Here

TOP

Related Classes of com.dooapp.fxform.filter.ExcludeFilter

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.