Reverted web client changes as it breaking CPS functionality:
[cps.git] / cps-ncmp-service / src / test / groovy / org / onap / cps / ncmp / api / impl / config / NcmpConfigurationSpec.groovy
index f588e2e..74e3424 100644 (file)
@@ -31,9 +31,12 @@ import org.springframework.web.client.RestTemplate
 import spock.lang.Specification
 
 @SpringBootTest
-@ContextConfiguration(classes = [ HttpClientConfiguration])
+@ContextConfiguration(classes = [NcmpConfiguration.DmiProperties, HttpClientConfiguration])
 class NcmpConfigurationSpec extends Specification{
 
+    @Autowired
+    NcmpConfiguration.DmiProperties dmiProperties
+
     @Autowired
     HttpClientConfiguration httpClientConfiguration
 
@@ -44,6 +47,12 @@ class NcmpConfigurationSpec extends Specification{
              new NcmpConfiguration() != null
     }
 
+    def 'DMI Properties.'() {
+        expect: 'properties are set to values in test configuration yaml file'
+            dmiProperties.authUsername == 'some-user'
+            dmiProperties.authPassword == 'some-password'
+    }
+
     def 'Rest Template creation with CloseableHttpClient and MappingJackson2HttpMessageConverter.'() {
         when: 'a rest template is created'
             def result = NcmpConfiguration.restTemplate(mockRestTemplateBuilder, httpClientConfiguration)