diff options
author | Steve Smokowski <ss835w@att.com> | 2019-08-12 13:49:33 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-08-12 13:49:33 +0000 |
commit | c8b8b314536a33b55cadc304fee58572a6ac2938 (patch) | |
tree | ff21ec0ed03496a31380b4566ec19a7eef45c749 /common/src/test | |
parent | 268e86197979fe195742514a9add172b6db740f0 (diff) | |
parent | fd42ba68518d781fbf1dd8407acfb28f55ae490e (diff) |
Merge "query builder now handles more than just strings"
Diffstat (limited to 'common/src/test')
-rw-r--r-- | common/src/test/java/org/onap/so/client/aai/DSLQueryBuilderTest.java | 10 |
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)")); + } } |