aboutsummaryrefslogtreecommitdiffstats
path: root/appc-config/appc-config-adaptor/provider/src/test/java/org
diff options
context:
space:
mode:
authorBalaji, Ramya (rb111y) <rb111y@att.com>2018-06-26 13:44:27 -0400
committerTakamune Cho <tc012c@att.com>2018-06-29 18:03:11 +0000
commitf392eb16a6f0014d51b8072a0b4e0fc8f234036c (patch)
treebe4b615b5cdb53dec1e97d5ab8ef94c18167fdf3 /appc-config/appc-config-adaptor/provider/src/test/java/org
parent89782dfde75df7873db2624b76c9c1d6223bb2a5 (diff)
Changes to Config Component Adaptor
Issue-ID: APPC-1014 Change-Id: I1ac95c68df92e39678b64919357333cd1664218d Signed-off-by: Balaji, Ramya (rb111y) <rb111y@att.com>
Diffstat (limited to 'appc-config/appc-config-adaptor/provider/src/test/java/org')
-rw-r--r--appc-config/appc-config-adaptor/provider/src/test/java/org/onap/appc/ccadaptor/ConfigComponentAdaptorTest.java39
1 files changed, 39 insertions, 0 deletions
diff --git a/appc-config/appc-config-adaptor/provider/src/test/java/org/onap/appc/ccadaptor/ConfigComponentAdaptorTest.java b/appc-config/appc-config-adaptor/provider/src/test/java/org/onap/appc/ccadaptor/ConfigComponentAdaptorTest.java
index 534606670..a863efbf6 100644
--- a/appc-config/appc-config-adaptor/provider/src/test/java/org/onap/appc/ccadaptor/ConfigComponentAdaptorTest.java
+++ b/appc-config/appc-config-adaptor/provider/src/test/java/org/onap/appc/ccadaptor/ConfigComponentAdaptorTest.java
@@ -209,6 +209,45 @@ public class ConfigComponentAdaptorTest {
ConfigComponentAdaptor cca = new ConfigComponentAdaptor(props);
String result = Whitebox.invokeMethod(cca, "trimResponse", "testData");
Assert.assertEquals("", result);
+
+
+ String withConfigData = "<data>\n" +
+ "<configuration xmlns=\"http://xml.juniper.net/xnm/1.1/xnm\">\n" +
+ "<version>1.1X.0</version>\n" +
+ "<groups>\n" +
+ "<name>node0</name>\n" +
+ "</configuration>\n" +
+ "</data>\n" +
+ "</rpc-reply>\n" +
+ "]]>]]>\n" +
+ "";
+ String compareString = "<configuration xmlns=\"http://xml.juniper.net/xnm/1.1/xnm\">\n"
+ + "<version>1.1X.0</version>\n"
+ + "<groups>\n"
+ + "<name>node0</name>\n"
+ + "</configuration>\n";
+
+ String result3 = Whitebox.invokeMethod(cca, "trimResponse", withConfigData);
+ Assert.assertEquals(compareString, result3);
+
+ String withData = "]]>]]>\n" +
+ "<rpc-reply xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\" message-id=\"1\">\n" +
+ "<data>\n" +
+ "<sgsn-mme xmlns=\"urn:rdns:com:ericsson:oammodel:ericsson-sgsn-mme\">\n" +
+ "<allocation-retention-priority xmlns=\"urn:rdns:com:ericsson:oammodel:ericsson-sgsn-mme\">\n" +
+ "<allocation-retention-priority>1</allocation-retention-priority>\n" +
+ "</allocation-retention-priority>\n" +
+ "</data>\n" +
+ "</rpc-reply>\n" +
+ "]]>]]";
+ String compareStringWithData = "<sgsn-mme xmlns=\"urn:rdns:com:ericsson:oammodel:ericsson-sgsn-mme\">\n" +
+ "<allocation-retention-priority xmlns=\"urn:rdns:com:ericsson:oammodel:ericsson-sgsn-mme\">\n" +
+ "<allocation-retention-priority>1</allocation-retention-priority>\n" +
+ "</allocation-retention-priority>\n";
+ String result2 = Whitebox.invokeMethod(cca, "trimResponse", withData);
+ Assert.assertEquals(compareStringWithData,result2);
+
+
}
@Test