diff options
author | pkaras <piotr.karas@nokia.com> | 2019-05-14 08:39:06 +0200 |
---|---|---|
committer | Dominic Lunanuova <dgl@research.att.com> | 2019-05-14 12:51:15 +0000 |
commit | 715872f016751eb1ba7fb0045a7fc3fc34bf2327 (patch) | |
tree | 8705de9c356b240e2e208a5aa007decb17eb1631 /src/test | |
parent | 9a8bdf20dbaf2f7e5ad473a60f9b083505ad908c (diff) |
Problem in building AAF permission - fix
Change-Id: If3c16d950ebe21d4f922b2e8f074e29ded26e9ce
Issue-ID: DMAAP-1200
Signed-off-by: piotr.karas <piotr.karas@nokia.com>
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)); |