From f14578b9c5d9a98cceb5342d69b0326289b1690c Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Sat, 27 Jul 2019 08:20:17 -0400 Subject: Add addTopic(List) New services are typically configured using TopicParameters. These are converted into Properties before being passed to TopicEndpoint.addTopic(), which then converts them into BusTopicParams before configuring a given topic. Added TopicEndpoint.addTopic(List), which makes it possible to configure the topics without going into the intermediate Properties. Furthermore, because TopicParams is a subclass of BusTopicParams, no conversion is needed for that either, so the TopicParams can be passed directly into the configuration classes. Incorporated changes from review. Change-Id: Id87e2c6812e36ae1a3ac680e6b35208667971782 Issue-ID: POLICY-1953 Signed-off-by: Jim Hahn --- .../endpoints/event/comm/bus/NoopTopicSourceFactoryTest.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'policy-endpoints/src/test/java/org/onap/policy/common/endpoints/event/comm/bus/NoopTopicSourceFactoryTest.java') diff --git a/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/event/comm/bus/NoopTopicSourceFactoryTest.java b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/event/comm/bus/NoopTopicSourceFactoryTest.java index c8a44292..e16174fd 100644 --- a/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/event/comm/bus/NoopTopicSourceFactoryTest.java +++ b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/event/comm/bus/NoopTopicSourceFactoryTest.java @@ -20,10 +20,19 @@ package org.onap.policy.common.endpoints.event.comm.bus; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + public class NoopTopicSourceFactoryTest extends NoopTopicFactoryTest { @Override protected NoopTopicSourceFactory buildFactory() { return new NoopTopicSourceFactory(); } + + @Test + public void testToString() { + assertTrue(new NoopTopicSourceFactory().toString().startsWith("NoopTopicSourceFactory [")); + } } -- cgit 1.2.3-korg