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 ->