X-Git-Url: https://gerrit.onap.org/r/gitweb?p=policy%2Fengine.git;a=blobdiff_plain;f=ONAP-PDP-REST%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Fpolicy%2Fpdp%2Frest%2Fapi%2Ftest%2FGetDictionaryServiceTest.java;h=1904b4bf081aec0ef8f9118d300f5e2349b4eb31;hp=682c9a1e0eb387c6622d79161e706dff282690d9;hb=refs%2Fchanges%2F84%2F98384%2F3;hpb=c28b1f1d441b8adf0645776931d658e13842ee74 diff --git a/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/test/GetDictionaryServiceTest.java b/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/test/GetDictionaryServiceTest.java index 682c9a1e0..1904b4bf0 100644 --- a/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/test/GetDictionaryServiceTest.java +++ b/ONAP-PDP-REST/src/test/java/org/onap/policy/pdp/rest/api/test/GetDictionaryServiceTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP-PDP-REST * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Modifications Copyright (C) 2019 Samsung * ================================================================================ @@ -19,6 +19,7 @@ * limitations under the License. * ============LICENSE_END========================================================= */ + package org.onap.policy.pdp.rest.api.test; import static org.junit.Assert.assertNotNull; @@ -31,16 +32,14 @@ public class GetDictionaryServiceTest { @Test public void dictionaryJsonTest() throws Exception { - Method formatDictionary = - GetDictionaryService.class.getDeclaredMethod("formatDictionaryJson", String.class); + Method formatDictionary = GetDictionaryService.class.getDeclaredMethod("formatDictionaryJson", String.class); formatDictionary.setAccessible(true); - String input = - "{\"key\":\"value\",\"key\":\"value\",\"key\":\"value\",\"key\":\"value\",\"key\":\"value\"," - + "\"key\":\"value\",\"key\":\"value\",\"key\":\"value\",\"key\":\"value\",\"key\":\"value\"," - + "\"key\":\"value\",\"key\":\"value\",\"key\":\"value\",\"key\":\"value\",\"key\":\"value\"," - + "\"key\":\"value\",\"key\":\"value\",\"key\":\"value\",\"key\":\"value\",\"key\":\"value\"," - + "\"key\":\"value\",\"key\":\"value\",\"key\":\"value\",\"key\":\"value\",\"key\":\"value\"," - + "\"key\":\"value\",\"key\":\"value\",\"key\":\"value\"}"; + String input = "{\"key\":\"value\",\"key\":\"value\",\"key\":\"value\",\"key\":\"value\",\"key\":\"value\"," + + "\"key\":\"value\",\"key\":\"value\",\"key\":\"value\",\"key\":\"value\",\"key\":\"value\"," + + "\"key\":\"value\",\"key\":\"value\",\"key\":\"value\",\"key\":\"value\",\"key\":\"value\"," + + "\"key\":\"value\",\"key\":\"value\",\"key\":\"value\",\"key\":\"value\",\"key\":\"value\"," + + "\"key\":\"value\",\"key\":\"value\",\"key\":\"value\",\"key\":\"value\",\"key\":\"value\"," + + "\"key\":\"value\",\"key\":\"value\",\"key\":\"value\"}"; DictionaryParameters dp = new DictionaryParameters(); dp.setDictionary("test"); GetDictionaryService gds = new GetDictionaryService(dp, null); @@ -77,7 +76,7 @@ public class GetDictionaryServiceTest { result = (String) formatDictionary.invoke(gds, input); assertNotNull(result); // - dp.setDictionary("PEPOptions"); + dp.setDictionary("PepOptions"); gds = new GetDictionaryService(dp, null); result = (String) formatDictionary.invoke(gds, input); assertNotNull(result); @@ -182,6 +181,11 @@ public class GetDictionaryServiceTest { result = (String) formatDictionary.invoke(gds, input); assertNotNull(result); // + dp.setDictionary("MicroServiceDictionaryData"); + gds = new GetDictionaryService(dp, null); + result = (String) formatDictionary.invoke(gds, input); + assertNotNull(result); + // dp.setDictionary("DCAEUUID"); gds = new GetDictionaryService(dp, null); result = (String) formatDictionary.invoke(gds, input);