diff options
author | Dominic Lunanuova <dgl@research.att.com> | 2019-05-14 13:08:13 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-05-14 13:08:13 +0000 |
commit | 7dd1b8a4b7a3e87d555721b8d234f50e2305bcd0 (patch) | |
tree | 19191ce35df660fe1c0bf7de244ebef2465df146 /src/test | |
parent | c81973deba0c2eeaaa424b398bed50c5cc8faece (diff) | |
parent | 715872f016751eb1ba7fb0045a7fc3fc34bf2327 (diff) |
Merge "Problem in building AAF permission - fix"
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/org/onap/dmaap/dbcapi/util/PermissionBuilderTest.java | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/test/java/org/onap/dmaap/dbcapi/util/PermissionBuilderTest.java b/src/test/java/org/onap/dmaap/dbcapi/util/PermissionBuilderTest.java index 61bb4b6..8db9d2e 100644 --- a/src/test/java/org/onap/dmaap/dbcapi/util/PermissionBuilderTest.java +++ b/src/test/java/org/onap/dmaap/dbcapi/util/PermissionBuilderTest.java @@ -116,7 +116,21 @@ public class PermissionBuilderTest { @Test public void buildPermission_shouldBuildPermissionWithRealInstance() { //given - String path = "/subpath/topics/"; + String path = "/dmaap"; + String method = "GET"; + initPermissionBuilder(path, method, provideRealInstance(DMAAP_NAME)); + + //when + String permission = permissionBuilder.buildPermission(request); + + //then + assertEquals("org.onap.dmaap-bc.api.dmaap|mr|GET", permission); + } + + @Test + public void buildPermission_shouldBuildPermissionWhenUrlContainsId() { + //given + String path = "/topics/topic_id_123"; String method = "GET"; initPermissionBuilder(path, method, provideRealInstance(DMAAP_NAME)); |