diff options
author | Sirisha_Manchikanti <sirisha.manchikanti@est.tech> | 2022-08-25 15:00:58 +0100 |
---|---|---|
committer | Sirisha_Manchikanti <sirisha.manchikanti@est.tech> | 2022-09-21 10:54:56 +0100 |
commit | 775b9f1e14a246b2df0a65bd63c0775120659f35 (patch) | |
tree | 7f768cbbf9859fe420f6b4e923105425837af85b /policy-endpoints/src/test/java/org/onap/policy/common/endpoints/event/comm/bus/KafkaTopicSourceFactoryTest.java | |
parent | b433dd58dc50b5c59f84ea18908b5e1a0f25f78a (diff) |
Publish and Subscribe to Kafka topic
Issue-ID: POLICY-4134
Signed-off-by: Sirisha_Manchikanti <sirisha.manchikanti@est.tech>
Change-Id: Idefa5b6f3cb702a4b478b76570717e73214d235a
Diffstat (limited to 'policy-endpoints/src/test/java/org/onap/policy/common/endpoints/event/comm/bus/KafkaTopicSourceFactoryTest.java')
-rw-r--r-- | policy-endpoints/src/test/java/org/onap/policy/common/endpoints/event/comm/bus/KafkaTopicSourceFactoryTest.java | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/event/comm/bus/KafkaTopicSourceFactoryTest.java b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/event/comm/bus/KafkaTopicSourceFactoryTest.java index 6fa80a41..3a62b4a7 100644 --- a/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/event/comm/bus/KafkaTopicSourceFactoryTest.java +++ b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/event/comm/bus/KafkaTopicSourceFactoryTest.java @@ -24,7 +24,9 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.onap.policy.common.endpoints.properties.PolicyEndPointProperties.PROPERTY_KAFKA_SOURCE_TOPICS; +import static org.onap.policy.common.endpoints.properties.PolicyEndPointProperties.PROPERTY_TOPIC_EFFECTIVE_TOPIC_SUFFIX; +import java.util.Arrays; import java.util.Deque; import java.util.LinkedList; import java.util.List; @@ -40,6 +42,8 @@ public class KafkaTopicSourceFactoryTest extends KafkaTopicFactoryTestBase<Kafka private SourceFactory factory; + public static final String KAFKA_SERVER = "localhost:9092"; + /** * Creates the object to be tested. */ @@ -58,12 +62,6 @@ public class KafkaTopicSourceFactoryTest extends KafkaTopicFactoryTestBase<Kafka @Test @Override - public void testBuildBusTopicParams() { - super.testBuildBusTopicParams_Ex(); - } - - @Test - @Override public void testBuildProperties() { initFactory(); @@ -71,15 +69,30 @@ public class KafkaTopicSourceFactoryTest extends KafkaTopicFactoryTestBase<Kafka List<KafkaTopicSource> topics = buildTopics(makePropBuilder().makeTopic(MY_TOPIC).build()); assertEquals(1, topics.size()); assertEquals(MY_TOPIC, topics.get(0).getTopic()); + assertEquals(MY_EFFECTIVE_TOPIC, topics.get(0).getEffectiveTopic()); + + BusTopicParams params = getLastParams(); + assertEquals(true, params.isManaged()); + assertEquals(false, params.isUseHttps()); + assertEquals(Arrays.asList(KAFKA_SERVER), params.getServers()); + assertEquals(MY_TOPIC, params.getTopic()); + assertEquals(MY_EFFECTIVE_TOPIC, params.getEffectiveTopic()); } @Test @Override public void testDestroyString_testGet_testInventory() { + super.testDestroyString_testGet_testInventory(); super.testDestroyString_Ex(); } @Test + @Override + public void testDestroy() { + super.testDestroy(); + } + + @Test public void testGet() { super.testGet_Ex(); } |