summaryrefslogtreecommitdiffstats
path: root/dcae-analytics-cdap-tca/src/test
diff options
context:
space:
mode:
authorSingla, Rajiv (rs153v) <rs153v@att.com>2017-10-04 16:32:12 -0400
committerSingla, Rajiv (rs153v) <rs153v@att.com>2017-10-04 16:32:49 -0400
commitbff77d5302988e01a82bb3b224313cbb12123e5c (patch)
tree4983687d6b92639dbdfa1cb828c0d74fc720cccf /dcae-analytics-cdap-tca/src/test
parent294cba47b07654e90b6be22e9b59b308d100243d (diff)
TCA: Get DMaaP pub/sub info from preferences
Change-Id: Ifb300fbd50dfe329590f74f6933118cab44b196c Signed-off-by: Singla, Rajiv (rs153v) <rs153v@att.com> Issue-Id: DCAEGEN2-123
Diffstat (limited to 'dcae-analytics-cdap-tca/src/test')
-rw-r--r--dcae-analytics-cdap-tca/src/test/java/org/openecomp/dcae/apod/analytics/cdap/tca/utils/CDAPTCAUtilsTest.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/dcae-analytics-cdap-tca/src/test/java/org/openecomp/dcae/apod/analytics/cdap/tca/utils/CDAPTCAUtilsTest.java b/dcae-analytics-cdap-tca/src/test/java/org/openecomp/dcae/apod/analytics/cdap/tca/utils/CDAPTCAUtilsTest.java
index 2cb9002..7b4f72b 100644
--- a/dcae-analytics-cdap-tca/src/test/java/org/openecomp/dcae/apod/analytics/cdap/tca/utils/CDAPTCAUtilsTest.java
+++ b/dcae-analytics-cdap-tca/src/test/java/org/openecomp/dcae/apod/analytics/cdap/tca/utils/CDAPTCAUtilsTest.java
@@ -28,6 +28,8 @@ import org.openecomp.dcae.apod.analytics.cdap.tca.BaseAnalyticsCDAPTCAUnitTest;
import org.openecomp.dcae.apod.analytics.cdap.tca.settings.TCAAppPreferences;
import org.openecomp.dcae.apod.analytics.model.domain.policy.tca.TCAPolicy;
+import java.util.Map;
+
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThat;
@@ -42,7 +44,10 @@ public class CDAPTCAUtilsTest extends BaseAnalyticsCDAPTCAUnitTest {
@Test
public void testGetValidatedTCAAppPreferences() throws Exception {
RuntimeContext runtimeContext = mock(RuntimeContext.class);
- when(runtimeContext.getRuntimeArguments()).thenReturn(getPreferenceMap());
+ final Map<String, String> preferenceMap = getPreferenceMap();
+ preferenceMap.remove("subscriberHostName");
+ preferenceMap.remove("publisherHostName");
+ when(runtimeContext.getRuntimeArguments()).thenReturn(preferenceMap);
ApplicationSpecification mockApplicationSpecification = Mockito.mock(ApplicationSpecification.class);
when(mockApplicationSpecification.getConfiguration()).thenReturn(fromStream(TCA_APP_CONFIG_FILE_LOCATION));
when(runtimeContext.getApplicationSpecification()).thenReturn(mockApplicationSpecification);