diff options
author | Piotr Jaszczyk <piotr.jaszczyk@nokia.com> | 2018-08-24 12:51:14 +0200 |
---|---|---|
committer | Piotr Jaszczyk <piotr.jaszczyk@nokia.com> | 2018-08-31 12:16:08 +0200 |
commit | d00acee05c05c7e3146abf7d13b78953f9a0d3f9 (patch) | |
tree | 521e0ef361bf176ce96ad6c718f198f464412b1c /hv-collector-domain | |
parent | 5bdae83e8b93cebbb84f56d5830beb726a164d76 (diff) |
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 <piotr.jaszczyk@nokia.com>
Diffstat (limited to 'hv-collector-domain')
2 files changed, 2 insertions, 2 deletions
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 <piotr.jaszczyk@nokia.com> * @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() = |