Search in sources :

Example 1 with DSLNodeKey

use of org.onap.aaiclient.client.graphinventory.entities.DSLNodeKey in project so by onap.

the class DSLQueryBuilderTest method outputOnNodeLambdasTest.

@Test
public void outputOnNodeLambdasTest() {
    DSLQueryBuilder<Start, Start> builder = TraversalBuilder.fragment(new DSLStartNode(Types.L_INTERFACE, new DSLNodeKey("interface-id", "myId")));
    builder.to(Types.VSERVER, __.key("vserver-name", "myName")).output().to(Types.P_INTERFACE).output();
    assertEquals("l-interface('interface-id', 'myId') > vserver*('vserver-name', 'myName') > p-interface*", builder.build().get());
}
Also used : Start(org.onap.aaiclient.client.graphinventory.entities.Start) DSLNodeKey(org.onap.aaiclient.client.graphinventory.entities.DSLNodeKey) DSLStartNode(org.onap.aaiclient.client.graphinventory.entities.DSLStartNode) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 DSLNodeKey (org.onap.aaiclient.client.graphinventory.entities.DSLNodeKey)1 DSLStartNode (org.onap.aaiclient.client.graphinventory.entities.DSLStartNode)1 Start (org.onap.aaiclient.client.graphinventory.entities.Start)1