aboutsummaryrefslogtreecommitdiffstats
path: root/ms/cds-sdc-listener/application/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'ms/cds-sdc-listener/application/src/test')
-rw-r--r--ms/cds-sdc-listener/application/src/test/java/org/onap/ccsdk/cds/cdssdclistener/service/ListenerServiceImplTest.java44
-rw-r--r--ms/cds-sdc-listener/application/src/test/resources/service-Testsvc140.csarbin0 -> 116298 bytes
2 files changed, 44 insertions, 0 deletions
diff --git a/ms/cds-sdc-listener/application/src/test/java/org/onap/ccsdk/cds/cdssdclistener/service/ListenerServiceImplTest.java b/ms/cds-sdc-listener/application/src/test/java/org/onap/ccsdk/cds/cdssdclistener/service/ListenerServiceImplTest.java
new file mode 100644
index 000000000..05e1ffdec
--- /dev/null
+++ b/ms/cds-sdc-listener/application/src/test/java/org/onap/ccsdk/cds/cdssdclistener/service/ListenerServiceImplTest.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2019 Bell Canada. All rights reserved.
+ *
+ * NOTICE: All the intellectual and technical concepts contained herein are
+ * proprietary to Bell Canada and are protected by trade secret or copyright law.
+ * Unauthorized copying of this file, via any medium is strictly prohibited.
+ */
+
+package org.onap.ccsdk.cds.cdssdclistener.service;
+
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.TemporaryFolder;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+@RunWith(SpringRunner.class)
+@EnableConfigurationProperties(ListenerServiceImpl.class)
+@SpringBootTest(classes = {ListenerServiceImplTest.class})
+public class ListenerServiceImplTest {
+
+ private static final String CSAR_SAMPLE = "src/test/resources/service-Testsvc140.csar";
+ private Path tempDirectoryPath;
+
+ @Rule
+ public TemporaryFolder folder = new TemporaryFolder();
+
+ @Autowired
+ private ListenerServiceImpl listenerService;
+
+ @Test
+ public void extractBluePrintSuccessfully() {
+ // Arrange
+ tempDirectoryPath = Paths.get(folder.getRoot().toString(), "cds-sdc-listener-test");
+
+ // Act
+ listenerService.extractBluePrint(CSAR_SAMPLE, tempDirectoryPath.toString());
+ }
+}
diff --git a/ms/cds-sdc-listener/application/src/test/resources/service-Testsvc140.csar b/ms/cds-sdc-listener/application/src/test/resources/service-Testsvc140.csar
new file mode 100644
index 000000000..4aa0de72b
--- /dev/null
+++ b/ms/cds-sdc-listener/application/src/test/resources/service-Testsvc140.csar
Binary files differ