add testcases 21/83921/1
authorsunil.unnava <sunil.unnava@att.com>
Tue, 2 Apr 2019 03:30:36 +0000 (23:30 -0400)
committersunil.unnava <sunil.unnava@att.com>
Tue, 2 Apr 2019 03:31:04 +0000 (23:31 -0400)
Issue-ID: DMAAP-1139
Change-Id: I53303289183b45406696477eb575c013d8a355fe
Signed-off-by: sunil.unnava <sunil.unnava@att.com>
src/test/java/org/onap/dmaap/mr/dmaapMMAgent/TestMirrorMakerAgent.java
src/test/java/org/onap/dmaap/mr/dmaapMMAgent/TestMirrorMakerProcessHandler.java

index f7b14d4..fdcb1ed 100644 (file)
@@ -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");
 
        }
 }
index 9d8b259..5f46dca 100644 (file)
@@ -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 {/*
                }
        }
 
-*/}
+}

© 2017 ONAP. Copyright © The Linux Foundation ®. All Rights Reserved.
The Linux Foundation has registered trademarks and uses trademarks.
For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.
Linux is a registered trademark of Linus Torvalds.
Privacy Policy and Terms of Use