Search in sources :

Example 1 with RelationalGraphWalker

use of org.finos.legend.pure.m2.relational.RelationalGraphWalker in project legend-pure by finos.

the class TestPureRuntimeClassMapping method testUnbindingOfRelationalOperationElementWithJoin.

@Test
public void testUnbindingOfRelationalOperationElementWithJoin() throws Exception {
    new RuntimeTestScriptBuilder().createInMemorySources(COMPLEX_TEST_SOURCES).compile().run(this.runtime, this.functionExecution);
    RelationalGraphWalker graphWalker = new RelationalGraphWalker(this.runtime, this.processorSupport);
    CoreInstance childOrgEmployeeCountsAttr = getPropertyMapping(graphWalker, "myMap", "Org", "childOrgEmployeeCount");
    Assert.assertNotNull(childOrgEmployeeCountsAttr);
    new RuntimeTestScriptBuilder().deleteSource(CLASS_MAPPING_SOURCE_ID).createInMemorySource(CLASS_MAPPING_SOURCE_ID, getComplexMapping(FastList.<String>newList())).compile().run(this.runtime, this.functionExecution);
    CoreInstance childOrgEmployeeCountsAttr2 = getPropertyMapping(graphWalker, "myMap", "Org", "childOrgEmployeeCount");
    Assert.assertNull(childOrgEmployeeCountsAttr2);
}
Also used : RelationalGraphWalker(org.finos.legend.pure.m2.relational.RelationalGraphWalker) RuntimeTestScriptBuilder(org.finos.legend.pure.m3.RuntimeTestScriptBuilder) CoreInstance(org.finos.legend.pure.m4.coreinstance.CoreInstance) Test(org.junit.Test)

Aggregations

RelationalGraphWalker (org.finos.legend.pure.m2.relational.RelationalGraphWalker)1 RuntimeTestScriptBuilder (org.finos.legend.pure.m3.RuntimeTestScriptBuilder)1 CoreInstance (org.finos.legend.pure.m4.coreinstance.CoreInstance)1 Test (org.junit.Test)1