aboutsummaryrefslogtreecommitdiffstats
path: root/sources/hv-collector-ves-message-generator/src/test
diff options
context:
space:
mode:
authorFilip Krzywka <filip.krzywka@nokia.com>2018-11-29 11:58:40 +0100
committerFilip Krzywka <filip.krzywka@nokia.com>2018-12-04 13:31:17 +0100
commitd632aef8303701a1802f817c3d6fdcd4064c32b2 (patch)
tree70614ef073f437810beea848c9f9a81189b794d8 /sources/hv-collector-ves-message-generator/src/test
parentdde383a2aa75f94c26d7949665b79cc95486a223 (diff)
Harmonize logging and add new logs
- corrected docker-compose consul url Change-Id: I78df868e0dd51008ef39d01553e6a0a3b8273a54 Issue-ID: DCAEGEN2-1003 Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
Diffstat (limited to 'sources/hv-collector-ves-message-generator/src/test')
-rw-r--r--sources/hv-collector-ves-message-generator/src/test/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/impl/MessageGeneratorImplTest.kt11
1 files changed, 6 insertions, 5 deletions
diff --git a/sources/hv-collector-ves-message-generator/src/test/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/impl/MessageGeneratorImplTest.kt b/sources/hv-collector-ves-message-generator/src/test/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/impl/MessageGeneratorImplTest.kt
index e2aec7df..930f020b 100644
--- a/sources/hv-collector-ves-message-generator/src/test/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/impl/MessageGeneratorImplTest.kt
+++ b/sources/hv-collector-ves-message-generator/src/test/kotlin/org/onap/dcae/collectors/veshv/ves/message/generator/impl/MessageGeneratorImplTest.kt
@@ -40,6 +40,7 @@ import org.onap.dcae.collectors.veshv.ves.message.generator.api.MessageType
import org.onap.ves.VesEventOuterClass.CommonEventHeader
import org.onap.ves.VesEventOuterClass.VesEvent
import reactor.test.test
+import kotlin.test.assertTrue
/**
* @author Jakub Dudycz <jakub.dudycz@nokia.com>
@@ -103,7 +104,7 @@ object MessageGeneratorImplTest : Spek({
)))
.test()
.assertNext {
- assertThat(it.isValid()).isTrue()
+ assertTrue(it.validate().isRight())
assertThat(it.payloadSize).isLessThan(maxPayloadSizeBytes)
assertThat(extractCommonEventHeader(it.payload).domain).isEqualTo(FAULT.domainName)
}
@@ -122,7 +123,7 @@ object MessageGeneratorImplTest : Spek({
)))
.test()
.assertNext {
- assertThat(it.isValid()).isTrue()
+ assertTrue(it.validate().isRight())
assertThat(it.payloadSize).isGreaterThan(maxPayloadSizeBytes)
assertThat(extractCommonEventHeader(it.payload).domain).isEqualTo(PERF3GPP.domainName)
}
@@ -140,7 +141,7 @@ object MessageGeneratorImplTest : Spek({
)))
.test()
.assertNext {
- assertThat(it.isValid()).isTrue()
+ assertTrue(it.validate().isRight())
assertThat(it.payloadSize).isLessThan(maxPayloadSizeBytes)
assertThatExceptionOfType(InvalidProtocolBufferException::class.java)
.isThrownBy { extractCommonEventHeader(it.payload) }
@@ -159,7 +160,7 @@ object MessageGeneratorImplTest : Spek({
)))
.test()
.assertNext {
- assertThat(it.isValid()).isFalse()
+ assertTrue(it.validate().isLeft())
assertThat(it.payloadSize).isLessThan(maxPayloadSizeBytes)
assertThat(extractCommonEventHeader(it.payload).domain).isEqualTo(PERF3GPP.domainName)
assertThat(it.versionMajor).isNotEqualTo(WireFrameMessage.SUPPORTED_VERSION_MINOR)
@@ -178,7 +179,7 @@ object MessageGeneratorImplTest : Spek({
)))
.test()
.assertNext {
- assertThat(it.isValid()).isTrue()
+ assertTrue(it.validate().isRight())
assertThat(it.payloadSize).isLessThan(maxPayloadSizeBytes)
assertThat(extractEventFields(it.payload).size()).isEqualTo(MessageGenerator.FIXED_PAYLOAD_SIZE)
assertThat(extractCommonEventHeader(it.payload).domain).isEqualTo(FAULT.domainName)