From 5272927ea8fd21487d640e22e62c087913e302f5 Mon Sep 17 00:00:00 2001 From: seanbeirne Date: Tue, 25 Jul 2023 16:54:03 +0100 Subject: DMI to NCMP Subscription Delete Response Issue-ID: CPS-1809 Signed-off-by: seanbeirne Change-Id: I482cdea009dccc97aea5e96d5d831603c6e21206 --- .../avcsubscription/SubscriptionEventConsumerSpec.groovy | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/test/groovy/org') diff --git a/src/test/groovy/org/onap/cps/ncmp/dmi/notifications/avcsubscription/SubscriptionEventConsumerSpec.groovy b/src/test/groovy/org/onap/cps/ncmp/dmi/notifications/avcsubscription/SubscriptionEventConsumerSpec.groovy index ba02f535..8382f67f 100644 --- a/src/test/groovy/org/onap/cps/ncmp/dmi/notifications/avcsubscription/SubscriptionEventConsumerSpec.groovy +++ b/src/test/groovy/org/onap/cps/ncmp/dmi/notifications/avcsubscription/SubscriptionEventConsumerSpec.groovy @@ -88,7 +88,7 @@ class SubscriptionEventConsumerSpec extends MessagingBaseSpec { def subscriptionEvent = objectMapper.readValue(jsonData, SubscriptionEvent.class) objectUnderTest.cmAvcSubscriptionResponseTopic = testTopic def cloudEvent = CloudEventBuilder.v1().withId(UUID.randomUUID().toString()).withSource(URI.create('test-ncmp-dmi')) - .withType("subscriptionCreated") + .withType(subscriptionType) .withDataSchema(URI.create("urn:cps:" + SubscriptionEvent.class.getName() + ":1.0.0")) .withExtension("correlationid", eventKey) .withTime(OffsetDateTime.ofInstant(timestamp.toInstant(), ZoneId.of("UTC"))) @@ -98,6 +98,10 @@ class SubscriptionEventConsumerSpec extends MessagingBaseSpec { objectUnderTest.consumeSubscriptionEvent(testEventSent) then: 'no exception is thrown' noExceptionThrown() + where: 'given #senario' + scenario | subscriptionType + 'Subscription Create Event' | "subscriptionCreated" + 'Subscription Delete Event' | "subscriptionDeleted" } def 'Consume invalid message.'() { -- cgit 1.2.3-korg