Package com.alibaba.citrus.service.form.impl.configuration.GroupConfigImpl

Examples of com.alibaba.citrus.service.form.impl.configuration.GroupConfigImpl.ImportImpl


    @Test
    public void extendGroup_import_notFound() throws Exception {
        group1.setParentGroup("group2");

        group2.setImports(createImportList(new ImportImpl("group3", null)));

        try {
            initForm(createGroupList(group1, group2));
            fail();
        } catch (IllegalArgumentException e) {
View Full Code Here


    @Test
    public void extendGroup_import_cycle() throws Exception {
        group1.setParentGroup("group2");
        group2.setParentGroup("group3");

        group3.setImports(createImportList(new ImportImpl("group1", null)));

        try {
            initForm(createGroupList(group1, group2, group3));
            fail();
        } catch (IllegalArgumentException e) {
View Full Code Here

    public void extendAndImportGroup() throws Exception {
        // group1 -> group2
        group1.setParentGroup("group2");

        // group2 imports group3.*
        group2.setImports(createImportList(new ImportImpl("group3", null)));

        // group3 imports group4.field4
        group3.setImports(createImportList(new ImportImpl("group4", "field4")));

        initForm(createGroupList(group1, group2, group3, group4));

        assertFields(group1, "field1", "field2", "field3", "field4");
        assertFields(group2, "field2", "field3", "field4");
View Full Code Here

    public void getImports() throws Exception {
        // default is empty
        assertTrue(group.getImports().isEmpty());

        // setImports
        List<Import> imports = createImportList(new ImportImpl("groupName", "fieldName"));
        group.setImports(imports);

        assertEquals(1, group.getImports().size());
        assertSame(imports.get(0), group.getImports().get(0));
View Full Code Here

        assertEquals(expectedValue, group2.isPostOnly());
    }

    @Test
    public void import_fieldNotFound() throws Exception {
        group2.setImports(createImportList(new ImportImpl("group1", "notExistField")));

        formConfig.setGroupConfigImplList(createGroupList(group1, group2));

        try {
            formConfig.afterPropertiesSet();
View Full Code Here

        group2 = new GroupConfigImpl();
        group2.setName("group2");
        group2.setFieldConfigImplList(createFieldList(field2, field3));

        if (importAll) {
            imports = createImportList(new ImportImpl("group1", null));
        } else {
            imports = createImportList(new ImportImpl("group1", "field1"));
        }

        group2.setImports(imports);
        group2.afterPropertiesSet();
View Full Code Here

        assertEquals("GroupConfig[name: group1, fields: 3]", group.toString());
    }

    @Test
    public void toString_import() {
        assertEquals("group1", new ImportImpl("group1", null).toString());
        assertEquals("group1", new ImportImpl(" group1 ", "  ").toString());
        assertEquals("group1.field1", new ImportImpl("group1", " field1 ").toString());
    }
View Full Code Here

TOP

Related Classes of com.alibaba.citrus.service.form.impl.configuration.GroupConfigImpl.ImportImpl

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.