summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
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 {/*
}
}
-*/}
+}