aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service
diff options
context:
space:
mode:
Diffstat (limited to 'ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service')
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BluePrintRestLibPropertyServiceTest.kt (renamed from ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintRestLibPropertyServiceTest.kt)44
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientPropertiesDSLTest.kt10
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientServiceTest.kt12
3 files changed, 33 insertions, 33 deletions
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintRestLibPropertyServiceTest.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BluePrintRestLibPropertyServiceTest.kt
index 117fbbd25..62fca20f7 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintRestLibPropertyServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BluePrintRestLibPropertyServiceTest.kt
@@ -23,13 +23,13 @@ import com.fasterxml.jackson.databind.JsonNode
import com.fasterxml.jackson.databind.ObjectMapper
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.rest.BlueprintRestLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.BluePrintRestLibConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.rest.SSLBasicAuthRestClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.rest.SSLRestClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.rest.SSLTokenAuthRestClientProperties
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.http.HttpHeaders
import org.springframework.http.MediaType
@@ -43,8 +43,8 @@ import kotlin.test.assertNotNull
@RunWith(SpringRunner::class)
@ContextConfiguration(
classes = [
- BlueprintRestLibConfiguration::class, BlueprintPropertyConfiguration::class,
- BlueprintPropertiesService::class
+ BluePrintRestLibConfiguration::class, BluePrintPropertyConfiguration::class,
+ BluePrintPropertiesService::class
]
)
@TestPropertySource(
@@ -75,10 +75,10 @@ import kotlin.test.assertNotNull
"blueprintsprocessor.restclient.ssl.sslKeyPassword=changeit"
]
)
-class BlueprintRestLibPropertyServiceTest {
+class BluePrintRestLibPropertyServiceTest {
@Autowired
- lateinit var bluePrintRestLibPropertyService: BlueprintRestLibPropertyService
+ lateinit var bluePrintRestLibPropertyService: BluePrintRestLibPropertyService
@Test
fun testRestClientProperties() {
@@ -287,7 +287,7 @@ class BlueprintRestLibPropertyServiceTest {
additionalHeadersChangedContentTypeToAPPLICATION_XML(endPointWithHeadersJson)
}
- // called from within "assertFailsWith(exceptionClass = BlueprintProcessorException::class) {"
+ // called from within "assertFailsWith(exceptionClass = BluePrintProcessorException::class) {"
private fun attemptToPutAuthorizationHeaderIntoAdditionalHeaders(endPointWithHeadersJson: String) {
val parsedObj: JsonNode = defaultMapper.readTree(endPointWithHeadersJson)
val bpWebClientService =
@@ -296,13 +296,13 @@ class BlueprintRestLibPropertyServiceTest {
}
@Test
- fun `BasicAuth WebClientService throws BlueprintProcessorException if additionalHeaders contain Authorization`() {
- assertFailsWith(exceptionClass = BlueprintProcessorException::class) {
+ fun `BasicAuth WebClientService throws BluePrintProcessorException if additionalHeaders contain Authorization`() {
+ assertFailsWith(exceptionClass = BluePrintProcessorException::class) {
val endPointWithHeadersJson = basicAuthEndpointWithHeadersField(additionalHeadersWithAuth)
attemptToPutAuthorizationHeaderIntoAdditionalHeaders(endPointWithHeadersJson)
}
// spec says headers are case insensitive...
- assertFailsWith(exceptionClass = BlueprintProcessorException::class) {
+ assertFailsWith(exceptionClass = BluePrintProcessorException::class) {
val endPointWithHeadersJson = basicAuthEndpointWithHeadersField(additionalHeadersWithAuthLowercased)
attemptToPutAuthorizationHeaderIntoAdditionalHeaders(endPointWithHeadersJson)
}
@@ -335,13 +335,13 @@ class BlueprintRestLibPropertyServiceTest {
}
@Test
- fun `TokenAuth WebClientService throws BlueprintProcessorException if additionalHeaders contain Authorization`() {
- assertFailsWith(exceptionClass = BlueprintProcessorException::class) {
+ fun `TokenAuth WebClientService throws BluePrintProcessorException if additionalHeaders contain Authorization`() {
+ assertFailsWith(exceptionClass = BluePrintProcessorException::class) {
val endPointWithHeadersJson = sslTokenAuthEndpointWithHeadersField(additionalHeadersWithAuth)
attemptToPutAuthorizationHeaderIntoAdditionalHeaders(endPointWithHeadersJson)
}
// spec says headers are case insensitive...
- assertFailsWith(exceptionClass = BlueprintProcessorException::class) {
+ assertFailsWith(exceptionClass = BluePrintProcessorException::class) {
val endPointWithHeadersJson = sslTokenAuthEndpointWithHeadersField(additionalHeadersWithAuthLowercased)
attemptToPutAuthorizationHeaderIntoAdditionalHeaders(endPointWithHeadersJson)
}
@@ -375,13 +375,13 @@ class BlueprintRestLibPropertyServiceTest {
}
@Test
- fun `SSLBasicAuth WebClientService throws BlueprintProcessorException if additionalHeaders contain Authorization`() {
- assertFailsWith(exceptionClass = BlueprintProcessorException::class) {
+ fun `SSLBasicAuth WebClientService throws BluePrintProcessorException if additionalHeaders contain Authorization`() {
+ assertFailsWith(exceptionClass = BluePrintProcessorException::class) {
val endPointWithHeadersJson = sslBasicAuthEndpointWithHeadersField(additionalHeadersWithAuth)
attemptToPutAuthorizationHeaderIntoAdditionalHeaders(endPointWithHeadersJson)
}
// spec says headers are case insensitive...
- assertFailsWith(exceptionClass = BlueprintProcessorException::class) {
+ assertFailsWith(exceptionClass = BluePrintProcessorException::class) {
val endPointWithHeadersJson = sslBasicAuthEndpointWithHeadersField(additionalHeadersWithAuthLowercased)
attemptToPutAuthorizationHeaderIntoAdditionalHeaders(endPointWithHeadersJson)
}
@@ -415,19 +415,19 @@ class BlueprintRestLibPropertyServiceTest {
}
@Test
- fun `SSLNoAuth WebClientService throws BlueprintProcessorException if additionalHeaders contain Authorization`() {
- assertFailsWith(exceptionClass = BlueprintProcessorException::class) {
+ fun `SSLNoAuth WebClientService throws BluePrintProcessorException if additionalHeaders contain Authorization`() {
+ assertFailsWith(exceptionClass = BluePrintProcessorException::class) {
val endPointWithHeadersJson = sslNoAuthEndpointWithHeadersField(additionalHeadersWithAuth)
attemptToPutAuthorizationHeaderIntoAdditionalHeaders(endPointWithHeadersJson)
}
// spec says headers are case insensitive...
- assertFailsWith(exceptionClass = BlueprintProcessorException::class) {
+ assertFailsWith(exceptionClass = BluePrintProcessorException::class) {
val endPointWithHeadersJson = sslNoAuthEndpointWithHeadersField(additionalHeadersWithAuthLowercased)
attemptToPutAuthorizationHeaderIntoAdditionalHeaders(endPointWithHeadersJson)
}
}
- companion object BlueprintRestLibPropertyServiceTest {
+ companion object BluePrintRestLibPropertyServiceTest {
val defaultMapper = ObjectMapper()
val expectedTokenAuthDefaultHeaders = mapOf<String, String>(
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientPropertiesDSLTest.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientPropertiesDSLTest.kt
index 6b083aaad..f06f827ad 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientPropertiesDSLTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientPropertiesDSLTest.kt
@@ -19,7 +19,7 @@ package org.onap.ccsdk.cds.blueprintsprocessor.rest.service
import org.junit.Test
import org.onap.ccsdk.cds.blueprintsprocessor.rest.relationshipTemplateRestClient
import org.onap.ccsdk.cds.blueprintsprocessor.rest.relationshipTypeConnectsToRestClient
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.relationshipTypeConnectsTo
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.serviceTemplate
import kotlin.test.assertEquals
@@ -73,12 +73,12 @@ class RestClientPropertiesDSLTest {
assertNotNull(relationshipTypes, "failed to get relationship types")
assertEquals(2, relationshipTypes.size, "relationshipTypes doesn't match")
assertNotNull(
- relationshipTypes[BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO],
- "failed to get ${BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO}"
+ relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO],
+ "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO}"
)
assertNotNull(
- relationshipTypes[BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_REST_CLIENT],
- "failed to get ${BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_REST_CLIENT}"
+ relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_REST_CLIENT],
+ "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_REST_CLIENT}"
)
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientServiceTest.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientServiceTest.kt
index e14e035a9..030996685 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientServiceTest.kt
@@ -27,9 +27,9 @@ import org.junit.After
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.rest.BlueprintRestLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.BluePrintRestLibConfiguration
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.autoconfigure.EnableAutoConfiguration
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
@@ -66,9 +66,9 @@ import kotlin.test.assertNotNull
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
@ContextConfiguration(
classes = [
- BlueprintRestLibConfiguration::class, SampleController::class,
+ BluePrintRestLibConfiguration::class, SampleController::class,
SecurityConfiguration::class,
- BlueprintPropertyConfiguration::class, BlueprintPropertiesService::class
+ BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class
]
)
@TestPropertySource(
@@ -96,7 +96,7 @@ import kotlin.test.assertNotNull
class RestClientServiceTest {
@Autowired
- lateinit var bluePrintRestLibPropertyService: BlueprintRestLibPropertyService
+ lateinit var bluePrintRestLibPropertyService: BluePrintRestLibPropertyService
@Autowired
lateinit var httpHandler: HttpHandler