From d632aef8303701a1802f817c3d6fdcd4064c32b2 Mon Sep 17 00:00:00 2001 From: Filip Krzywka Date: Thu, 29 Nov 2018 11:58:40 +0100 Subject: Harmonize logging and add new logs - corrected docker-compose consul url Change-Id: I78df868e0dd51008ef39d01553e6a0a3b8273a54 Issue-ID: DCAEGEN2-1003 Signed-off-by: Filip Krzywka --- .../dcae/collectors/veshv/domain/WireFrameCodecsTest.kt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'sources/hv-collector-domain/src/test') diff --git a/sources/hv-collector-domain/src/test/kotlin/org/onap/dcae/collectors/veshv/domain/WireFrameCodecsTest.kt b/sources/hv-collector-domain/src/test/kotlin/org/onap/dcae/collectors/veshv/domain/WireFrameCodecsTest.kt index f17a79ba..f8fbc0a3 100644 --- a/sources/hv-collector-domain/src/test/kotlin/org/onap/dcae/collectors/veshv/domain/WireFrameCodecsTest.kt +++ b/sources/hv-collector-domain/src/test/kotlin/org/onap/dcae/collectors/veshv/domain/WireFrameCodecsTest.kt @@ -60,7 +60,7 @@ object WireFrameCodecsTest : Spek({ payloadSize = 0) it("should fail validation") { - assertThat(input.isValid()).isFalse() + input.validate().assertFailedWithError { it.isInstanceOf(InvalidMajorVersion::class.java) } } } @@ -73,7 +73,7 @@ object WireFrameCodecsTest : Spek({ payloadSize = 0) it("should pass validation") { - assertThat(input.isValid()).isTrue() + assertTrue(input.validate().isRight()) } } @@ -86,7 +86,7 @@ object WireFrameCodecsTest : Spek({ payloadSize = 0) it("should fail validation") { - assertThat(input.isValid()).isFalse() + input.validate().assertFailedWithError { it.isInstanceOf(UnsupportedPayloadContentType::class.java) } } } @@ -99,7 +99,7 @@ object WireFrameCodecsTest : Spek({ payloadSize = 1) it("should fail validation") { - assertThat(input.isValid()).isFalse() + input.validate().assertFailedWithError { it.isInstanceOf(NotMatchingPayloadSize::class.java) } } } @@ -112,7 +112,7 @@ object WireFrameCodecsTest : Spek({ payloadSize = 8) it("should fail validation") { - assertThat(input.isValid()).isFalse() + input.validate().assertFailedWithError { it.isInstanceOf(NotMatchingPayloadSize::class.java) } } } @@ -126,7 +126,7 @@ object WireFrameCodecsTest : Spek({ payloadSize = payload.size) it("should pass validation") { - assertThat(input.isValid()).isTrue() + assertTrue(input.validate().isRight()) } } @@ -214,7 +214,7 @@ object WireFrameCodecsTest : Spek({ .writeByte(0xAB) val decoded = decoder.decodeFirst(buff).getMessageOrFail() - assertThat(decoded.isValid()).describedAs("should be valid").isTrue() + assertTrue(decoded.validate().isRight(), "should be valid") assertThat(buff.readableBytes()).isEqualTo(1) } } -- cgit 1.2.3-korg