summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorsunil.unnava <sunil.unnava@att.com>2019-04-01 23:30:36 -0400
committersunil.unnava <sunil.unnava@att.com>2019-04-01 23:31:04 -0400
commitd36378283cf16a5fffd85765a507f4a3f84f8a2b (patch)
tree3f8c5f04b3b843e11364e4283442685229959921 /src
parent1984a71414faf146b1088b185eb72c59820568bd (diff)
add testcases
Issue-ID: DMAAP-1139 Change-Id: I53303289183b45406696477eb575c013d8a355fe Signed-off-by: sunil.unnava <sunil.unnava@att.com>
Diffstat (limited to 'src')
-rw-r--r--src/test/java/org/onap/dmaap/mr/dmaapMMAgent/TestMirrorMakerAgent.java14
-rw-r--r--src/test/java/org/onap/dmaap/mr/dmaapMMAgent/TestMirrorMakerProcessHandler.java7
2 files changed, 13 insertions, 8 deletions
diff --git a/src/test/java/org/onap/dmaap/mr/dmaapMMAgent/TestMirrorMakerAgent.java b/src/test/java/org/onap/dmaap/mr/dmaapMMAgent/TestMirrorMakerAgent.java
index f7b14d4..fdcb1ed 100644
--- a/src/test/java/org/onap/dmaap/mr/dmaapMMAgent/TestMirrorMakerAgent.java
+++ b/src/test/java/org/onap/dmaap/mr/dmaapMMAgent/TestMirrorMakerAgent.java
@@ -23,7 +23,6 @@
package org.onap.dmaap.mr.dmaapMMAgent;
import static org.junit.Assert.*;
-import static org.mockito.Mockito.spy;
import java.util.ArrayList;
@@ -33,7 +32,6 @@ import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
-import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.modules.junit4.PowerMockRunner;
import org.onap.dmaap.mr.dmaapMMAgent.dao.ListMirrorMaker;
@@ -71,6 +69,14 @@ public class TestMirrorMakerAgent {
mirrorMakerAgent.main(args);
}
+
+ @Test
+ public void testcheckStartupWtOneParam() {
+ String parameters[] = { "test" };
+ mirrorMakerAgent.main(parameters);
+
+ }
+
@Test
public void testReadAgentTopics() {
@@ -156,14 +162,14 @@ public class TestMirrorMakerAgent {
@Test
public void testPublish() {
TopicUtil util = new TopicUtil();
- util.publishTopic("topicURL", "topicname", "mechid", "password", "message");
+ util.publishTopic("http://localhost:3904/events/testtopic", "topicname", "mechid", "password", "message");
}
@Test
public void testSubscribe() {
TopicUtil util = new TopicUtil();
- util.subscribeTopic("topicURL", "topicname", "1", "mechid", "password");
+ util.subscribeTopic("http://localhost:3904/events/testtopic/cg/c", "topicname", "1", "mechid", "password");
}
}
diff --git a/src/test/java/org/onap/dmaap/mr/dmaapMMAgent/TestMirrorMakerProcessHandler.java b/src/test/java/org/onap/dmaap/mr/dmaapMMAgent/TestMirrorMakerProcessHandler.java
index 9d8b259..5f46dca 100644
--- a/src/test/java/org/onap/dmaap/mr/dmaapMMAgent/TestMirrorMakerProcessHandler.java
+++ b/src/test/java/org/onap/dmaap/mr/dmaapMMAgent/TestMirrorMakerProcessHandler.java
@@ -22,7 +22,6 @@
package org.onap.dmaap.mr.dmaapMMAgent;
-import static org.junit.Assert.*;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -30,8 +29,8 @@ import org.powermock.modules.junit4.PowerMockRunner;
import org.onap.dmaap.mr.dmaapMMAgent.utils.MirrorMakerProcessHandler;
-//@RunWith(PowerMockRunner.class)
-public class TestMirrorMakerProcessHandler {/*
+@RunWith(PowerMockRunner.class)
+public class TestMirrorMakerProcessHandler {
@Test
public void testCheckMirrorMakerProcess() {
@@ -65,4 +64,4 @@ public class TestMirrorMakerProcessHandler {/*
}
}
-*/}
+}