diff options
author | Dan Timoney <dtimoney@att.com> | 2019-03-26 13:38:34 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-03-26 13:38:34 +0000 |
commit | 4aee3138b446163fe45d4a92758e16068132ac41 (patch) | |
tree | da915b1dc16cf4cf110e710926df520790ca66d7 /ms/cds-sdc-listener/application/src/test | |
parent | dd1bd2274c797865f803beea809b47579bd53dc9 (diff) | |
parent | 55e6e9e3614a32b5491d0e8fc2c5105a14d6779c (diff) |
Merge "CDS-SDC Listener application"
Diffstat (limited to 'ms/cds-sdc-listener/application/src/test')
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 Binary files differnew file mode 100644 index 000000000..4aa0de72b --- /dev/null +++ b/ms/cds-sdc-listener/application/src/test/resources/service-Testsvc140.csar |