aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules/inbounds/configs-api/src/test/kotlin
diff options
context:
space:
mode:
authorSingal, Kapil (ks220y) <ks220y@att.com>2019-11-22 18:06:08 -0500
committerKAPIL SINGAL <ks220y@att.com>2019-11-26 21:32:38 +0000
commit341db21b2ac0a14a1ed2b8bf7930914dda054bfe (patch)
tree113bba965b06cfe3a8af3a0a527d1a41c9faf0f9 /ms/blueprintsprocessor/modules/inbounds/configs-api/src/test/kotlin
parentd274e5fc552cf9ae25500f504f0434981cf3accf (diff)
Formatting Code base with ktlint
No Business logic change, just the code format. Competible with IntelliJ: https://github.com/pinterest/ktlint#option-3 To format run: mvn process-sources -P format Issue-ID: CCSDK-1947 Signed-off-by: Singal, Kapil (ks220y) <ks220y@att.com> Change-Id: Ic9e9209fb7023d77f434693ad5a01229f8d09331
Diffstat (limited to 'ms/blueprintsprocessor/modules/inbounds/configs-api/src/test/kotlin')
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/configs-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/configs/api/ResourceConfigSnapshotControllerTest.kt48
1 files changed, 25 insertions, 23 deletions
diff --git a/ms/blueprintsprocessor/modules/inbounds/configs-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/configs/api/ResourceConfigSnapshotControllerTest.kt b/ms/blueprintsprocessor/modules/inbounds/configs-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/configs/api/ResourceConfigSnapshotControllerTest.kt
index 89f62812e..34c7a7c7c 100644
--- a/ms/blueprintsprocessor/modules/inbounds/configs-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/configs/api/ResourceConfigSnapshotControllerTest.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/configs-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/configs/api/ResourceConfigSnapshotControllerTest.kt
@@ -35,8 +35,10 @@ import org.springframework.web.reactive.function.BodyInserters
@RunWith(SpringRunner::class)
@WebFluxTest
-@ContextConfiguration(classes = [BluePrintCoreConfiguration::class,
- BluePrintCatalogService::class, SecurityProperties::class])
+@ContextConfiguration(
+ classes = [BluePrintCoreConfiguration::class,
+ BluePrintCatalogService::class, SecurityProperties::class]
+)
@ComponentScan(basePackages = ["org.onap.ccsdk.cds.blueprintsprocessor", "org.onap.ccsdk.cds.controllerblueprints"])
@TestPropertySource(locations = ["classpath:application-test.properties"])
class ResourceConfigSnapshotControllerTest {
@@ -68,24 +70,24 @@ class ResourceConfigSnapshotControllerTest {
runBlocking {
webTestClient
- .post()
- .uri("/api/v1/configs/$resourceType/$resourceId/running")
- .body(BodyInserters.fromObject(snapshotData))
- .exchange()
- .expectStatus().is2xxSuccessful
- .expectBody()
- .jsonPath("$.createdDate")
- .value<String> { println(it) }
+ .post()
+ .uri("/api/v1/configs/$resourceType/$resourceId/running")
+ .body(BodyInserters.fromObject(snapshotData))
+ .exchange()
+ .expectStatus().is2xxSuccessful
+ .expectBody()
+ .jsonPath("$.createdDate")
+ .value<String> { println(it) }
webTestClient
- .post()
- .uri("/api/v1/configs/$resourceType/$resourceId/running")
- .body(BodyInserters.fromObject(snapshotData))
- .exchange()
- .expectStatus().is2xxSuccessful
- .expectBody()
- .jsonPath("$.createdDate")
- .value<String> { println(it)}
+ .post()
+ .uri("/api/v1/configs/$resourceType/$resourceId/running")
+ .body(BodyInserters.fromObject(snapshotData))
+ .exchange()
+ .expectStatus().is2xxSuccessful
+ .expectBody()
+ .jsonPath("$.createdDate")
+ .value<String> { println(it) }
}
}
@@ -93,7 +95,7 @@ class ResourceConfigSnapshotControllerTest {
fun `get returns requested JSON content-type`() {
runBlocking {
post(resourceType, "22", "RUNNING")
- get("json", resourceType,"22", "RUNNING")
+ get("json", resourceType, "22", "RUNNING")
}
}
@@ -122,8 +124,8 @@ class ResourceConfigSnapshotControllerTest {
val arguments = "resourceId=MISSING&resourceType=PNF&status=TOTALLY_WRONG"
webTestClient.get().uri("/api/v1/configs?$arguments")
- .exchange()
- .expectStatus().isBadRequest
+ .exchange()
+ .expectStatus().isBadRequest
}
}
@@ -140,7 +142,7 @@ class ResourceConfigSnapshotControllerTest {
}
}
- private fun post( resourceType: String, resourceId: String, status: String) {
+ private fun post(resourceType: String, resourceId: String, status: String) {
webTestClient
.post()
.uri("/api/v1/configs/$resourceType/$resourceId/$status")
@@ -150,7 +152,7 @@ class ResourceConfigSnapshotControllerTest {
.expectBody()
}
- private fun get(expectedType : String, resourceType: String, resourceId: String, status: String) {
+ private fun get(expectedType: String, resourceType: String, resourceId: String, status: String) {
var requestArguments = "resourceId=$resourceId&resourceType=$resourceType&status=$status"
if (expectedType.isNotEmpty()) {