Search in sources :

Example 6 with Rdb$fields

use of org.jooq.util.firebird.rdb.tables.Rdb$fields in project atlasmap by atlasmap.

the class AtlasUtilTest method testExcludeNotRequestedFieldsShouldIncludeAllIfIncludePathsNull.

@Test
public void testExcludeNotRequestedFieldsShouldIncludeAllIfIncludePathsNull() {
    Document document = new Document();
    Fields fields = new Fields();
    fields.getField().add(newField("/A", newField("/A/A", newField("/A/A/A"), newField("/A/A/B")), newField("/A/B", newField("/A/B/A", newField("/A/B/A/A")))));
    document.setFields(fields);
    AtlasUtil.excludeNotRequestedFields(document, null);
    assertEquals("/A{/A/A{/A/A/A{}, /A/A/B{}, }, /A/B{/A/B/A{/A/B/A/A{}, }, }, }, ", fields.getField().get(0).toString());
}
Also used : Fields(io.atlasmap.v2.Fields) Document(io.atlasmap.v2.Document) Test(org.junit.jupiter.api.Test)

Example 7 with Rdb$fields

use of org.jooq.util.firebird.rdb.tables.Rdb$fields in project atlasmap by atlasmap.

the class AtlasUtilTest method testExcludeNotRequestedFieldsShouldIncludeAllIntermediateLevels.

@Test
public void testExcludeNotRequestedFieldsShouldIncludeAllIntermediateLevels() {
    Document document = new Document();
    Fields fields = new Fields();
    fields.getField().add(newField("/A", newField("/A/A", newField("/A/A/A"), newField("/A/A/B")), newField("/A/B", newField("/A/B/A", newField("/A/B/A/A")))));
    document.setFields(fields);
    AtlasUtil.excludeNotRequestedFields(document, Arrays.asList("/A/A/B"));
    assertEquals("/A{/A/A{/A/A/A{}, /A/A/B{}, }, /A/B{}, }, ", fields.getField().get(0).toString());
}
Also used : Fields(io.atlasmap.v2.Fields) Document(io.atlasmap.v2.Document) Test(org.junit.jupiter.api.Test)

Example 8 with Rdb$fields

use of org.jooq.util.firebird.rdb.tables.Rdb$fields in project atlasmap by atlasmap.

the class AtlasUtilTest method testExcludeNotRequestedFieldsShouldIncludeTwoDifferentLevels.

@Test
public void testExcludeNotRequestedFieldsShouldIncludeTwoDifferentLevels() {
    Document document = new Document();
    Fields fields = new Fields();
    fields.getField().add(newField("/A", newField("/A/A", newField("/A/A/A"), newField("/A/A/B")), newField("/A/B", newField("/A/B/A", newField("/A/B/A/A")))));
    document.setFields(fields);
    AtlasUtil.excludeNotRequestedFields(document, Arrays.asList("/A/A", "/A/B"));
    assertEquals("/A{/A/A{/A/A/A{}, /A/A/B{}, }, /A/B{/A/B/A{}, }, }, ", fields.getField().get(0).toString());
}
Also used : Fields(io.atlasmap.v2.Fields) Document(io.atlasmap.v2.Document) Test(org.junit.jupiter.api.Test)

Example 9 with Rdb$fields

use of org.jooq.util.firebird.rdb.tables.Rdb$fields in project atlasmap by atlasmap.

the class AtlasUtilTest method testExcludeNotRequestedFieldsShouldIncludeAllIfIncludePathsEmpty.

@Test
public void testExcludeNotRequestedFieldsShouldIncludeAllIfIncludePathsEmpty() {
    Document document = new Document();
    Fields fields = new Fields();
    fields.getField().add(newField("/A", newField("/A/A", newField("/A/A/A"), newField("/A/A/B")), newField("/A/B", newField("/A/B/A", newField("/A/B/A/A")))));
    document.setFields(fields);
    AtlasUtil.excludeNotRequestedFields(document, Collections.emptyList());
    assertEquals("/A{/A/A{/A/A/A{}, /A/A/B{}, }, /A/B{/A/B/A{/A/B/A/A{}, }, }, }, ", fields.getField().get(0).toString());
}
Also used : Fields(io.atlasmap.v2.Fields) Document(io.atlasmap.v2.Document) Test(org.junit.jupiter.api.Test)

Example 10 with Rdb$fields

use of org.jooq.util.firebird.rdb.tables.Rdb$fields in project atlasmap by atlasmap.

the class AtlasUtilTest method testExcludeNotRequestedFieldsShouldIncludeTwoLevels.

@Test
public void testExcludeNotRequestedFieldsShouldIncludeTwoLevels() {
    Document document = new Document();
    Fields fields = new Fields();
    fields.getField().add(newField("/A", newField("/A/A", newField("/A/A/A"), newField("/A/A/B")), newField("/A/B", newField("/A/B/A", newField("/A/B/A/A")))));
    document.setFields(fields);
    AtlasUtil.excludeNotRequestedFields(document, Arrays.asList("/A/B"));
    assertEquals("/A{/A/A{}, /A/B{/A/B/A{}, }, }, ", fields.getField().get(0).toString());
}
Also used : Fields(io.atlasmap.v2.Fields) Document(io.atlasmap.v2.Document) Test(org.junit.jupiter.api.Test)

Aggregations

Fields (io.atlasmap.v2.Fields)15 Record (org.jooq.Record)9 Document (io.atlasmap.v2.Document)8 ArrayList (java.util.ArrayList)7 Test (org.junit.jupiter.api.Test)7 DefaultDataTypeDefinition (org.jooq.meta.DefaultDataTypeDefinition)5 Rdb$fields (org.jooq.meta.firebird.rdb.tables.Rdb$fields)5 XmlFields (io.atlasmap.xml.v2.XmlFields)4 DataTypeDefinition (org.jooq.meta.DataTypeDefinition)3 ColumnDefinition (org.jooq.util.ColumnDefinition)3 DefaultDataTypeDefinition (org.jooq.util.DefaultDataTypeDefinition)3 Rdb$fields (org.jooq.util.firebird.rdb.tables.Rdb$fields)3 XSSchemaSet (com.sun.xml.xsom.XSSchemaSet)2 Rdb$functionArguments (org.jooq.meta.firebird.rdb.tables.Rdb$functionArguments)2 Rdb$procedureParameters (org.jooq.meta.firebird.rdb.tables.Rdb$procedureParameters)2 DefaultColumnDefinition (org.jooq.util.DefaultColumnDefinition)2 Rdb$procedureParameters (org.jooq.util.firebird.rdb.tables.Rdb$procedureParameters)2 XSOMParser (com.sun.xml.xsom.parser.XSOMParser)1 DomAnnotationParserFactory (com.sun.xml.xsom.util.DomAnnotationParserFactory)1 AtlasException (io.atlasmap.api.AtlasException)1