From d00acee05c05c7e3146abf7d13b78953f9a0d3f9 Mon Sep 17 00:00:00 2001 From: Piotr Jaszczyk Date: Fri, 24 Aug 2018 12:51:14 +0200 Subject: Improve DCAE APP Simulator coverage Also there was a need to refactor the code, because application logic was placed inside Ratpack handlers. Change-Id: Iba3d4d039a98ba88e0dba580c1b7726b53440538 Issue-ID: DCAEGEN2-732 Signed-off-by: Piotr Jaszczyk --- .../src/main/kotlin/org/onap/dcae/collectors/veshv/domain/codec.kt | 2 +- .../kotlin/org/onap/dcae/collectors/veshv/domain/WireFrameCodecsTest.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'hv-collector-domain') diff --git a/hv-collector-domain/src/main/kotlin/org/onap/dcae/collectors/veshv/domain/codec.kt b/hv-collector-domain/src/main/kotlin/org/onap/dcae/collectors/veshv/domain/codec.kt index b2e42509..c61ab266 100644 --- a/hv-collector-domain/src/main/kotlin/org/onap/dcae/collectors/veshv/domain/codec.kt +++ b/hv-collector-domain/src/main/kotlin/org/onap/dcae/collectors/veshv/domain/codec.kt @@ -31,7 +31,7 @@ import org.onap.dcae.collectors.veshv.domain.PayloadWireFrameMessage.Companion.R * @author Piotr Jaszczyk * @since June 2018 */ -class WireFrameEncoder(private val allocator: ByteBufAllocator) { +class WireFrameEncoder(private val allocator: ByteBufAllocator = ByteBufAllocator.DEFAULT) { fun encode(frame: PayloadWireFrameMessage): ByteBuf { val bb = allocator.buffer(PayloadWireFrameMessage.HEADER_SIZE + frame.payload.size()) diff --git a/hv-collector-domain/src/test/kotlin/org/onap/dcae/collectors/veshv/domain/WireFrameCodecsTest.kt b/hv-collector-domain/src/test/kotlin/org/onap/dcae/collectors/veshv/domain/WireFrameCodecsTest.kt index 89d1f32e..fa63c36e 100644 --- a/hv-collector-domain/src/test/kotlin/org/onap/dcae/collectors/veshv/domain/WireFrameCodecsTest.kt +++ b/hv-collector-domain/src/test/kotlin/org/onap/dcae/collectors/veshv/domain/WireFrameCodecsTest.kt @@ -40,7 +40,7 @@ import kotlin.test.fail */ object WireFrameCodecsTest : Spek({ val payloadAsString = "coffeebabe" - val encoder = WireFrameEncoder(UnpooledByteBufAllocator.DEFAULT) + val encoder = WireFrameEncoder() val decoder = WireFrameDecoder() fun createSampleFrame() = -- cgit 1.2.3-korg