com.github.lemfi.kest.rabbitmq.executor.RabbitMQSingleMessagesQueueReaderExecution.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of step-rabbitmq Show documentation
Show all versions of step-rabbitmq Show documentation
Backends testing with Kotlin
package com.github.lemfi.kest.rabbitmq.executor
import com.github.lemfi.kest.core.model.Execution
import com.github.lemfi.kest.rabbitmq.model.RabbitMQMessage
internal class RabbitMQSingleMessagesQueueReaderExecution(
queueName: String,
deleteQueue: Boolean,
connection: String,
vhost: String,
l: ByteArray.() -> T,
) : Execution>() {
val execution = RabbitMQMultipleMessagesQueueReaderExecution(queueName, deleteQueue, connection, vhost, 1, l)
override fun onAssertionFailedError() {
execution.onAssertionFailedError()
}
override fun onAssertionSuccess() {
execution.onAssertionSuccess()
}
override fun onExecutionEnded() {
execution.onExecutionEnded()
}
override fun execute(): RabbitMQMessage {
return execution
.execute()
.first()
}
}