summaryrefslogtreecommitdiffstats
path: root/csarvalidation/src/test/java/org/onap/cvc/csar/PnfManifestParserTest.java
diff options
context:
space:
mode:
authorKanagaraj Manickam <kanagaraj.manickam@huawei.com>2019-04-09 09:33:40 +0000
committerGerrit Code Review <gerrit@onap.org>2019-04-09 09:33:40 +0000
commit00e2233d95577a78c47cbabcce818191287a2a63 (patch)
tree8aba0792e5dc446375ea2d130e2ef0ce9c397e0d /csarvalidation/src/test/java/org/onap/cvc/csar/PnfManifestParserTest.java
parent4827d14388d40fdffd95d560ae6500604aff578f (diff)
parente58e011a89ae5c8ada209a82d9b0f3ad1b0ca58f (diff)
Merge "PNF TC R146092"
Diffstat (limited to 'csarvalidation/src/test/java/org/onap/cvc/csar/PnfManifestParserTest.java')
-rw-r--r--csarvalidation/src/test/java/org/onap/cvc/csar/PnfManifestParserTest.java16
1 files changed, 15 insertions, 1 deletions
diff --git a/csarvalidation/src/test/java/org/onap/cvc/csar/PnfManifestParserTest.java b/csarvalidation/src/test/java/org/onap/cvc/csar/PnfManifestParserTest.java
index f680438..2f3a050 100644
--- a/csarvalidation/src/test/java/org/onap/cvc/csar/PnfManifestParserTest.java
+++ b/csarvalidation/src/test/java/org/onap/cvc/csar/PnfManifestParserTest.java
@@ -20,6 +20,7 @@ import org.apache.commons.lang3.tuple.Pair;
import org.junit.Before;
import org.junit.Test;
+import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
import java.util.List;
@@ -34,7 +35,7 @@ public class PnfManifestParserTest {
@Before
public void setUp() throws URISyntaxException, IOException {
- pnfManifestParser = PnfManifestParser.getInstance("./src/test/resources/pnf/MainServiceTemplate.mf");
+ pnfManifestParser = PnfManifestParser.getInstance(new File("./src/test/resources/pnf/MainServiceTemplate.mf"));
}
@Test
@@ -52,6 +53,19 @@ public class PnfManifestParserTest {
@Test
+ public void shouldFetchSourcesSectionFromFile() {
+
+ Pair<List<String>, List<CSARArchive.CSARError>> sourcesPair = pnfManifestParser.fetchSourcesSection();
+ List<String> sources = sourcesPair.getKey();
+ List<CSARArchive.CSARError> errors = sourcesPair.getValue();
+
+ assertThat(sources).contains("Definitions/MainServiceTemplate.yaml", "Definitions/etsi_nfv_sol001_vnfd_2_5_1_types.yaml");
+ assertThat(errors.size()).isEqualTo(0);
+ }
+
+
+
+ @Test
public void shouldFetchNonManoArtifactsFromFile() {
Pair<Map<String, Map<String, List<String>>>, List<CSARArchive.CSARError>> mapListPair = pnfManifestParser.fetchNonManoArtifacts();
Map<String, Map<String, List<String>>> nonManoArtifacts = mapListPair.getKey();