summaryrefslogtreecommitdiffstats
path: root/common/src/test
diff options
context:
space:
mode:
authorBenjamin, Max <max.benjamin@att.com>2019-08-09 08:53:50 -0400
committerBenjamin, Max (mb388a) <mb388a@att.com>2019-08-09 08:53:52 -0400
commitfd42ba68518d781fbf1dd8407acfb28f55ae490e (patch)
tree920939356b3106cff5e9fdb0800552761a756da1 /common/src/test
parentc55a88d9e00399708cd6c5ea7b562ca579aabbfe (diff)
query builder now handles more than just strings
query builder now handles more than just strings Issue-ID: SO-2215 Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com> Change-Id: Ib138d96cf8578a0e3055120f9c3e036c690e7eae
Diffstat (limited to 'common/src/test')
-rw-r--r--common/src/test/java/org/onap/so/client/aai/DSLQueryBuilderTest.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/common/src/test/java/org/onap/so/client/aai/DSLQueryBuilderTest.java b/common/src/test/java/org/onap/so/client/aai/DSLQueryBuilderTest.java
index 6e55fe17fa..590e83827b 100644
--- a/common/src/test/java/org/onap/so/client/aai/DSLQueryBuilderTest.java
+++ b/common/src/test/java/org/onap/so/client/aai/DSLQueryBuilderTest.java
@@ -108,4 +108,14 @@ public class DSLQueryBuilderTest {
builder.equals("pserver*('hostname', 'my-hostname') > p-interface > sriov-pf('pf-pci-id', 'my-id')"));
assertTrue(builder.equals(builder));
}
+
+
+ @Test
+ public void mixedTypeTest() {
+ DSLQueryBuilder<DSLNode, DSLNode> builder = new DSLQueryBuilder<>(new DSLNode(AAIObjectType.CLOUD_REGION,
+ __.key("cloud-owner", "owner"), __.key("cloud-region-id", "id")));
+ builder.to(__.node(AAIObjectType.VLAN_TAG, __.key("vlan-id-outer", 167), __.key("my-boolean", true)).output());
+ assertTrue(builder.equals(
+ "cloud-region('cloud-owner', 'owner')('cloud-region-id', 'id') > vlan-tag*('vlan-id-outer', 167)('my-boolean', true)"));
+ }
}