diff options
Diffstat (limited to 'hv-collector-dcae-app-simulator/src')
3 files changed, 11 insertions, 11 deletions
diff --git a/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/MessageStreamValidation.kt b/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/MessageStreamValidation.kt index 51f94cc4..38de5370 100644 --- a/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/MessageStreamValidation.kt +++ b/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/MessageStreamValidation.kt @@ -24,7 +24,7 @@ import arrow.effects.fix import arrow.effects.monadError import arrow.typeclasses.bindingCatch import org.onap.dcae.collectors.veshv.domain.ByteData -import org.onap.dcae.collectors.veshv.domain.PayloadWireFrameMessage +import org.onap.dcae.collectors.veshv.domain.WireFrameMessage import org.onap.dcae.collectors.veshv.utils.arrow.asIo import org.onap.dcae.collectors.veshv.ves.message.generator.api.MessageGenerator import org.onap.dcae.collectors.veshv.ves.message.generator.api.MessageParameters @@ -77,7 +77,7 @@ class MessageStreamValidation( private fun generateEvents(parameters: List<MessageParameters>): IO<List<VesEventOuterClass.VesEvent>> = messageGenerator.createMessageFlux(parameters) - .map(PayloadWireFrameMessage::payload) + .map(WireFrameMessage::payload) .map(ByteData::unsafeAsArray) .map(VesEventOuterClass.VesEvent::parseFrom) .collectList() diff --git a/hv-collector-dcae-app-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/DcaeAppSimulatorTest.kt b/hv-collector-dcae-app-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/DcaeAppSimulatorTest.kt index 017360bb..34ec8f5a 100644 --- a/hv-collector-dcae-app-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/DcaeAppSimulatorTest.kt +++ b/hv-collector-dcae-app-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/DcaeAppSimulatorTest.kt @@ -179,6 +179,6 @@ private fun vesEvent(eventId: String = DUMMY_EVENT_ID, payload: String = DUMMY_P return VesEvent.newBuilder() .setCommonEventHeader(CommonEventHeader.newBuilder() .setEventId(eventId)) - .setHvMeasFields(ByteString.copyFrom(payload.toByteArray())) + .setEventFields(ByteString.copyFrom(payload.toByteArray())) .build() } diff --git a/hv-collector-dcae-app-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/MessageStreamValidationTest.kt b/hv-collector-dcae-app-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/MessageStreamValidationTest.kt index beef26b6..05fdd808 100644 --- a/hv-collector-dcae-app-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/MessageStreamValidationTest.kt +++ b/hv-collector-dcae-app-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/impl/MessageStreamValidationTest.kt @@ -31,7 +31,7 @@ import org.jetbrains.spek.api.Spek import org.jetbrains.spek.api.dsl.describe import org.jetbrains.spek.api.dsl.it import org.mockito.ArgumentMatchers.anyList -import org.onap.dcae.collectors.veshv.domain.PayloadWireFrameMessage +import org.onap.dcae.collectors.veshv.domain.WireFrameMessage import org.onap.dcae.collectors.veshv.ves.message.generator.api.MessageGenerator import org.onap.dcae.collectors.veshv.ves.message.generator.api.MessageParameters import org.onap.dcae.collectors.veshv.ves.message.generator.api.MessageParametersParser @@ -89,7 +89,7 @@ internal class MessageStreamValidationTest : Spek({ // given val jsonAsStream = sampleJsonAsStream() val event = vesEvent() - val generatedWireProtocolFrame = PayloadWireFrameMessage(event.toByteArray()) + val generatedWireProtocolFrame = WireFrameMessage(event.toByteArray()) val receivedMessageBytes = event.toByteArray() givenParsedMessageParameters(MessageParameters(event.commonEventHeader, MessageType.VALID, 1)) @@ -107,7 +107,7 @@ internal class MessageStreamValidationTest : Spek({ val jsonAsStream = sampleJsonAsStream() val generatedEvent = vesEvent(payload = "payload A") val receivedEvent = vesEvent(payload = "payload B") - val generatedWireProtocolFrame = PayloadWireFrameMessage(generatedEvent.toByteArray()) + val generatedWireProtocolFrame = WireFrameMessage(generatedEvent.toByteArray()) val receivedMessageBytes = receivedEvent.toByteArray() givenParsedMessageParameters(MessageParameters(generatedEvent.commonEventHeader, MessageType.VALID, 1)) @@ -125,7 +125,7 @@ internal class MessageStreamValidationTest : Spek({ val jsonAsStream = sampleJsonAsStream() val generatedEvent = vesEvent() val receivedEvent = vesEvent(eventId = "bbb") - val generatedWireProtocolFrame = PayloadWireFrameMessage(generatedEvent.toByteArray()) + val generatedWireProtocolFrame = WireFrameMessage(generatedEvent.toByteArray()) val receivedMessageBytes = receivedEvent.toByteArray() givenParsedMessageParameters(MessageParameters(generatedEvent.commonEventHeader, MessageType.VALID, 1)) @@ -144,7 +144,7 @@ internal class MessageStreamValidationTest : Spek({ // given val jsonAsStream = sampleJsonAsStream() val event = vesEvent() - val generatedWireProtocolFrame = PayloadWireFrameMessage(event.toByteArray()) + val generatedWireProtocolFrame = WireFrameMessage(event.toByteArray()) val receivedMessageBytes = event.toByteArray() givenParsedMessageParameters(MessageParameters(event.commonEventHeader, MessageType.FIXED_PAYLOAD, 1)) @@ -162,7 +162,7 @@ internal class MessageStreamValidationTest : Spek({ val jsonAsStream = sampleJsonAsStream() val generatedEvent = vesEvent(payload = "payload A") val receivedEvent = vesEvent(payload = "payload B") - val generatedWireProtocolFrame = PayloadWireFrameMessage(generatedEvent.toByteArray()) + val generatedWireProtocolFrame = WireFrameMessage(generatedEvent.toByteArray()) val receivedMessageBytes = receivedEvent.toByteArray() givenParsedMessageParameters(MessageParameters(generatedEvent.commonEventHeader, MessageType.FIXED_PAYLOAD, 1)) @@ -180,7 +180,7 @@ internal class MessageStreamValidationTest : Spek({ val jsonAsStream = sampleJsonAsStream() val generatedEvent = vesEvent() val receivedEvent = vesEvent("bbb") - val generatedWireProtocolFrame = PayloadWireFrameMessage(generatedEvent.toByteArray()) + val generatedWireProtocolFrame = WireFrameMessage(generatedEvent.toByteArray()) val receivedMessageBytes = receivedEvent.toByteArray() givenParsedMessageParameters(MessageParameters(generatedEvent.commonEventHeader, MessageType.FIXED_PAYLOAD, 1)) @@ -205,7 +205,7 @@ private fun vesEvent(eventId: String = DUMMY_EVENT_ID, payload: String = DUMMY_P return VesEvent.newBuilder() .setCommonEventHeader(CommonEventHeader.newBuilder() .setEventId(eventId)) - .setHvMeasFields(ByteString.copyFrom(payload.toByteArray())) + .setEventFields(ByteString.copyFrom(payload.toByteArray())) .build() } |