2 * Copyright (C) 2019 Bell Canada. All rights reserved.
4 * NOTICE: All the intellectual and technical concepts contained herein are
5 * proprietary to Bell Canada and are protected by trade secret or copyright law.
6 * Unauthorized copying of this file, via any medium is strictly prohibited.
9 package org.onap.ccsdk.cds.cdssdclistener.service;
11 import java.nio.file.Path;
12 import java.nio.file.Paths;
13 import org.junit.Rule;
14 import org.junit.Test;
15 import org.junit.rules.TemporaryFolder;
16 import org.junit.runner.RunWith;
17 import org.springframework.beans.factory.annotation.Autowired;
18 import org.springframework.boot.context.properties.EnableConfigurationProperties;
19 import org.springframework.boot.test.context.SpringBootTest;
20 import org.springframework.test.context.junit4.SpringRunner;
22 @RunWith(SpringRunner.class)
23 @EnableConfigurationProperties(ListenerServiceImpl.class)
24 @SpringBootTest(classes = {ListenerServiceImplTest.class})
25 public class ListenerServiceImplTest {
27 private static final String CSAR_SAMPLE = "src/test/resources/service-Testsvc140.csar";
28 private Path tempDirectoryPath;
31 public TemporaryFolder folder = new TemporaryFolder();
34 private ListenerServiceImpl listenerService;
37 public void extractBluePrintSuccessfully() {
39 tempDirectoryPath = Paths.get(folder.getRoot().toString(), "cds-sdc-listener-test");
42 listenerService.extractBluePrint(CSAR_SAMPLE, tempDirectoryPath.toString());