Convert component functions IT to UT.
[ccsdk/cds.git] / ms / blueprintsprocessor / modules / inbounds / designer-api / src / test / kotlin / org / onap / ccsdk / cds / blueprintsprocessor / designer / api / ResourceDictionaryControllerTest.kt
1 /*
2  *  Copyright © 2019 IBM.
3  *
4  *  Licensed under the Apache License, Version 2.0 (the "License");
5  *  you may not use this file except in compliance with the License.
6  *  You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  *  Unless required by applicable law or agreed to in writing, software
11  *  distributed under the License is distributed on an "AS IS" BASIS,
12  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  *  See the License for the specific language governing permissions and
14  *  limitations under the License.
15  */
16
17 package org.onap.ccsdk.cds.blueprintsprocessor.designer.api
18
19 import org.junit.FixMethodOrder
20 import org.junit.Test
21 import org.junit.runner.RunWith
22 import org.junit.runners.MethodSorters
23 import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
24 import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
25 import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibConfiguration
26 import org.springframework.beans.factory.annotation.Autowired
27 import org.springframework.boot.test.context.SpringBootTest
28 import org.springframework.test.context.ContextConfiguration
29 import org.springframework.test.context.TestPropertySource
30 import org.springframework.test.context.junit4.SpringRunner
31 import kotlin.test.assertNotNull
32
33 @RunWith(SpringRunner::class)
34 @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
35 @ContextConfiguration(classes = [DesignerApiTestConfiguration::class,
36     BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class, BluePrintDBLibConfiguration::class])
37 @TestPropertySource(locations = ["classpath:application-test.properties"])
38 @FixMethodOrder(MethodSorters.NAME_ASCENDING)
39 class ResourceDictionaryControllerTest {
40
41     @Autowired
42     lateinit var resourceDictionaryController: ResourceDictionaryController
43
44     @Test
45     fun testResourceDictionaryControllerPresence() {
46         assertNotNull(resourceDictionaryController, "failed to initialise ResourceDictionaryController")
47     }
48
49 }