From faaf89d113eb5b820f5d5806de0e0a466ba79964 Mon Sep 17 00:00:00 2001 From: Rahul_cool Date: Wed, 1 Apr 2020 15:49:25 +0530 Subject: Added code for decoding base64 encoded value Issue-ID: SDNC-899 Signed-off-by: Rahul_cool Change-Id: I231f891118dabf59518bcf4dbe456df97cd3e5b2 (cherry picked from commit 4cbff49506b31844ccda7ca38b3ba7283974475a) --- .../onap/ccsdk/sli/core/slipluginutils/SliStringUtilsTest.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'sliPluginUtils/provider/src/test/java') diff --git a/sliPluginUtils/provider/src/test/java/org/onap/ccsdk/sli/core/slipluginutils/SliStringUtilsTest.java b/sliPluginUtils/provider/src/test/java/org/onap/ccsdk/sli/core/slipluginutils/SliStringUtilsTest.java index 3a6c31a3..da7046f4 100644 --- a/sliPluginUtils/provider/src/test/java/org/onap/ccsdk/sli/core/slipluginutils/SliStringUtilsTest.java +++ b/sliPluginUtils/provider/src/test/java/org/onap/ccsdk/sli/core/slipluginutils/SliStringUtilsTest.java @@ -386,4 +386,13 @@ public class SliStringUtilsTest { assertEquals(SliStringUtils.FALSE_CONSTANT, result); } + @Test + public void testBase64DecodingAlgo() throws Exception{ + String input = "MDUxMDAw"; + String decodeVal = "decodedPath"; + param.put("encodedValue",input); + param.put("decodedValue", decodeVal); + SliStringUtils.base64DecodingAlgo(param,ctx); + assertEquals("051000",ctx.getAttribute(decodeVal)); + } } -- cgit 1.2.3-korg