import org.onap.ccsdk.cds.controllerblueprints.core.jsonAsJsonType
import kotlin.test.assertNotNull
-class BlueprintNatsServiceTest {
+class BluePrintNatsServiceTest {
@Test
fun testTokenAuthNatService() {
}
""".trimIndent()
- val bluePrintNatsLibPropertyService = BlueprintNatsLibPropertyService(mockk())
+ val bluePrintNatsLibPropertyService = BluePrintNatsLibPropertyService(mockk())
- val spkBlueprintNatsLibPropertyService = spyk(bluePrintNatsLibPropertyService)
+ val spkBluePrintNatsLibPropertyService = spyk(bluePrintNatsLibPropertyService)
every {
- spkBlueprintNatsLibPropertyService
+ spkBluePrintNatsLibPropertyService
.bluePrintNatsService(any<NatsConnectionProperties>())
} returns TokenAuthNatsService(
mockk()
)
val bluePrintNatsService =
- spkBlueprintNatsLibPropertyService.bluePrintNatsService(configuration.jsonAsJsonType())
+ spkBluePrintNatsLibPropertyService.bluePrintNatsService(configuration.jsonAsJsonType())
assertNotNull(bluePrintNatsService, "failed to get NATS Service")
}
}
""".trimIndent()
- val bluePrintNatsLibPropertyService = BlueprintNatsLibPropertyService(mockk())
+ val bluePrintNatsLibPropertyService = BluePrintNatsLibPropertyService(mockk())
- val spkBlueprintNatsLibPropertyService = spyk(bluePrintNatsLibPropertyService)
+ val spkBluePrintNatsLibPropertyService = spyk(bluePrintNatsLibPropertyService)
every {
- spkBlueprintNatsLibPropertyService
+ spkBluePrintNatsLibPropertyService
.bluePrintNatsService(any<NatsConnectionProperties>())
} returns TLSAuthNatsService(
mockk()
)
val bluePrintNatsService =
- spkBlueprintNatsLibPropertyService.bluePrintNatsService(configuration.jsonAsJsonType())
+ spkBluePrintNatsLibPropertyService.bluePrintNatsService(configuration.jsonAsJsonType())
assertNotNull(bluePrintNatsService, "failed to get NATS Service")
}
}
}
- private fun testMultiPublish(natsService: BlueprintNatsService) {
+ private fun testMultiPublish(natsService: BluePrintNatsService) {
runBlocking {
/** Multiple Publish Message Test **/
val messageHandler1 =
}
}
- private fun testLoadBalance(natsService: BlueprintNatsService) {
+ private fun testLoadBalance(natsService: BluePrintNatsService) {
runBlocking {
/** Load balance Publish Message Test **/
val lbMessageHandler1 =
}
}
- private fun testLimitSubscription(natsService: BlueprintNatsService) {
+ private fun testLimitSubscription(natsService: BluePrintNatsService) {
runBlocking {
/** Load balance Publish Message Test **/
val lbMessageHandler1 =
}
}
- private fun testRequestReply(natsService: BlueprintNatsService) {
+ private fun testRequestReply(natsService: BluePrintNatsService) {
runBlocking {
val lbMessageHandler1 = io.nats.client.MessageHandler { message ->
println("LB RR Request Handler 1: ${String(message.data)} will reply to(${message.replyTo})")
}
}
- private fun testMultiRequestReply(natsService: BlueprintNatsService) {
+ private fun testMultiRequestReply(natsService: BluePrintNatsService) {
runBlocking {
/** Request Reply **/
val lbMessageHandler1 = io.nats.client.MessageHandler { message ->