X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=src%2Ftest%2Fjava%2Forg%2Fonap%2Faai%2Fmodelloader%2Fdistribution%2FNotificationIntegrationTest.java;h=abdefd47ea44596fa2568f2312f9dacec2bcc117;hb=df2ad94ee9b641a4c2c19969816a6275f6d056e3;hp=2645871469acdccb40fcd294f2b3634d7c1bc64a;hpb=e820afb80b830453f667280d94f6e86279ad4f2c;p=aai%2Fmodel-loader.git diff --git a/src/test/java/org/onap/aai/modelloader/distribution/NotificationIntegrationTest.java b/src/test/java/org/onap/aai/modelloader/distribution/NotificationIntegrationTest.java index 2645871..abdefd4 100644 --- a/src/test/java/org/onap/aai/modelloader/distribution/NotificationIntegrationTest.java +++ b/src/test/java/org/onap/aai/modelloader/distribution/NotificationIntegrationTest.java @@ -26,6 +26,7 @@ import java.util.concurrent.TimeUnit; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; +import org.onap.aai.modelloader.notification.NotificationDataImpl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.test.context.SpringBootTest; @@ -35,25 +36,26 @@ import org.springframework.test.annotation.DirtiesContext; @DirtiesContext @SpringBootTest(properties = { "model-loader.sdc.connection.enabled=true"}) -@EmbeddedKafka(partitions = 1, brokerProperties = { "listeners=PLAINTEXT://localhost:9092", "port=9092" }) +@EmbeddedKafka(partitions = 1, ports = 9092, topics = {"${topics.distribution.notification}"}) public class NotificationIntegrationTest { @Autowired EventCallbackAspect eventCallbackAspect; @Autowired - private KafkaTemplate kafkaTemplate; + private KafkaTemplate kafkaTemplate; - @Value("${test.topic}") + @Value("${topics.distribution.notification}") private String topic; @Test @Disabled("This test is not yet implemented") public void thatActivateCallbackIsCalled() throws Exception { - String data = "Smth"; - + NotificationDataImpl notificationData = new NotificationDataImpl(); + notificationData.setDistributionID("distributionID"); + // TODO: send distribution event here - kafkaTemplate.send(topic, data); + kafkaTemplate.send(topic, notificationData); // TODO: mock distribution client requests to /sdc/v1/artifactTypes // TODO: mock distribution client requests to /sdc/v1/distributionKafkaData