aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/java/org/onap
diff options
context:
space:
mode:
authorLee, Tian (tl5884) <TianL@amdocs.com>2018-06-28 17:35:04 +0100
committerLee, Tian (tl5884) <TianL@amdocs.com>2018-06-28 17:35:04 +0100
commit80a8e4b685a16ef58603fc487d7c0c2adf427b02 (patch)
tree3cc1789f15a1908b858876c440c19ea1ef02856e /src/test/java/org/onap
parent4036c9aae1965d3fa53956085e9d6f90feb217a8 (diff)
Support Port Mirroring Configuration model
Add support for Port Mirroring Configuration XML model generation from SDC TOSCA Change-Id: I44718d20a53e343ee34ae47ef2bc35d49c862ddf Issue-ID: AAI-1345 Signed-off-by: Lee, Tian (tl5884) <TianL@amdocs.com>
Diffstat (limited to 'src/test/java/org/onap')
-rw-r--r--src/test/java/org/onap/aai/babel/service/CsarToXmlConverterTest.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/java/org/onap/aai/babel/service/CsarToXmlConverterTest.java b/src/test/java/org/onap/aai/babel/service/CsarToXmlConverterTest.java
index 3dd8382..62e9265 100644
--- a/src/test/java/org/onap/aai/babel/service/CsarToXmlConverterTest.java
+++ b/src/test/java/org/onap/aai/babel/service/CsarToXmlConverterTest.java
@@ -63,6 +63,9 @@ public class CsarToXmlConverterTest {
),
NO_YAML_FILES(
"noYmlFilesArchive.zip"
+ ),
+ PORT_MIRROR_CSAR(
+ "service_PortMirror.csar"
);
private String filename;
@@ -147,6 +150,18 @@ public class CsarToXmlConverterTest {
ga.getPayload(), matches(expectedXmlFiles.get(ga.getName()))));
}
+ @Test
+ public void generatePortMirrorConfigurationModel()
+ throws CsarConverterException, IOException, XmlArtifactGenerationException {
+ Map<String, String> expectedXmlFiles = createExpectedXmlFiles();
+ List<BabelArtifact> generatedArtifacts = converter.generateXmlFromCsar(CsarTest.PORT_MIRROR_CSAR.getContent(),
+ CsarTest.PORT_MIRROR_CSAR.getName(), SERVICE_VERSION);
+
+ generatedArtifacts
+ .forEach(ga -> assertThat("The content of " + ga.getName() + " must match the expected content",
+ ga.getPayload(), matches(expectedXmlFiles.get(ga.getName()))));
+ }
+
public Matcher<String> matches(final String expected) {
return new BaseMatcher<String>() {
protected String theExpected = expected;
@@ -171,6 +186,8 @@ public class CsarToXmlConverterTest {
filesToLoad.add("AAI-SdWanTestVsp..DUMMY..module-0-resource-2.xml");
filesToLoad.add("AAI-Tunnel_XConnTest-resource-2.0.xml");
filesToLoad.add("AAI-SD-WAN-Test-VSP-resource-1.0.xml");
+ filesToLoad.add("AAI-Port Mirror_Test-service-1.0.xml");
+ filesToLoad.add("AAI-Port Mirroring Configuration-resource-35.0.xml");
for (String filename : filesToLoad) {
xmlMap.put(filename, new ArtifactTestUtils().loadResourceAsString("generatedXml/" + filename));