aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/java/org/onap/dmaap/mr/client/response
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/org/onap/dmaap/mr/client/response')
-rw-r--r--src/test/java/org/onap/dmaap/mr/client/response/JUnitTestSuite.java23
-rw-r--r--src/test/java/org/onap/dmaap/mr/client/response/MRConsumerResponseTest.java85
-rw-r--r--src/test/java/org/onap/dmaap/mr/client/response/MRPublisherResponseTest.java103
-rw-r--r--src/test/java/org/onap/dmaap/mr/client/response/TestRunner.java26
4 files changed, 123 insertions, 114 deletions
diff --git a/src/test/java/org/onap/dmaap/mr/client/response/JUnitTestSuite.java b/src/test/java/org/onap/dmaap/mr/client/response/JUnitTestSuite.java
index 362da00..0302edd 100644
--- a/src/test/java/org/onap/dmaap/mr/client/response/JUnitTestSuite.java
+++ b/src/test/java/org/onap/dmaap/mr/client/response/JUnitTestSuite.java
@@ -4,12 +4,14 @@
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright © 2021 Orange.
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -21,7 +23,6 @@
package org.onap.dmaap.mr.client.response;
import junit.framework.TestSuite;
-
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
@@ -29,17 +30,17 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@RunWith(Suite.class)
-@SuiteClasses({ MRConsumerResponseTest.class, MRPublisherResponseTest.class,})
+@SuiteClasses({MRConsumerResponseTest.class, MRPublisherResponseTest.class,})
public class JUnitTestSuite {
- private static final Logger LOGGER = LoggerFactory.getLogger(JUnitTestSuite.class);
+ private static final Logger logger = LoggerFactory.getLogger(JUnitTestSuite.class);
+
+ public static void main(String[] args) {
+ logger.info("Running the test suite");
- public static void main(String[] args) {
- LOGGER.info("Running the test suite");
-
- TestSuite tstSuite = new TestSuite();
- LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
- }
+ TestSuite tstSuite = new TestSuite();
+ logger.info("Total Test Counts " + tstSuite.countTestCases());
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/client/response/MRConsumerResponseTest.java b/src/test/java/org/onap/dmaap/mr/client/response/MRConsumerResponseTest.java
index 0676fd7..2a89dae 100644
--- a/src/test/java/org/onap/dmaap/mr/client/response/MRConsumerResponseTest.java
+++ b/src/test/java/org/onap/dmaap/mr/client/response/MRConsumerResponseTest.java
@@ -4,12 +4,14 @@
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright © 2021 Orange.
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,70 +22,71 @@
package org.onap.dmaap.mr.client.response;
-import static org.junit.Assert.assertTrue;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
+import static org.junit.Assert.assertTrue;
+
public class MRConsumerResponseTest {
- private MRConsumerResponse test = null;
+ private MRConsumerResponse test = null;
- @Before
- public void setUp() throws Exception {
- test = new MRConsumerResponse();
+ @Before
+ public void setUp() throws Exception {
+ test = new MRConsumerResponse();
- }
+ }
- @After
- public void tearDown() throws Exception {
+ @After
+ public void tearDown() throws Exception {
- }
+ }
- @Test
- public void testGetResponseCode() {
+ @Test
+ public void testGetResponseCode() {
- test.getResponseCode();
- assertTrue(true);
+ test.getResponseCode();
+ assertTrue(true);
- }
+ }
- @Test
- public void testSetResponseCode() {
+ @Test
+ public void testSetResponseCode() {
- test.setResponseCode("200");
- assertTrue(true);
+ test.setResponseCode("200");
+ assertTrue(true);
- }
+ }
- @Test
- public void testGetResponseMessage() {
+ @Test
+ public void testGetResponseMessage() {
- test.getResponseMessage();
- assertTrue(true);
+ test.getResponseMessage();
+ assertTrue(true);
- }
+ }
- @Test
- public void testSetResponseMessage() {
+ @Test
+ public void testSetResponseMessage() {
- test.setResponseMessage("responseMessage");
- assertTrue(true);
+ test.setResponseMessage("responseMessage");
+ assertTrue(true);
- }
+ }
- @Test
- public void testGetActualMessages() {
+ @Test
+ public void testGetActualMessages() {
- test.getActualMessages();
- assertTrue(true);
+ test.getActualMessages();
+ assertTrue(true);
- }
+ }
- @Test
- public void testSetActualMessages() {
+ @Test
+ public void testSetActualMessages() {
- test.setActualMessages(null);
- assertTrue(true);
+ test.setActualMessages(null);
+ assertTrue(true);
- }
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/client/response/MRPublisherResponseTest.java b/src/test/java/org/onap/dmaap/mr/client/response/MRPublisherResponseTest.java
index 19c829a..07b4ba3 100644
--- a/src/test/java/org/onap/dmaap/mr/client/response/MRPublisherResponseTest.java
+++ b/src/test/java/org/onap/dmaap/mr/client/response/MRPublisherResponseTest.java
@@ -4,12 +4,14 @@
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright © 2021 Orange.
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,80 +22,81 @@
package org.onap.dmaap.mr.client.response;
-import static org.junit.Assert.assertTrue;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
+import static org.junit.Assert.assertTrue;
+
public class MRPublisherResponseTest {
- private MRPublisherResponse response = null;
+ private MRPublisherResponse response = null;
+
+ @Before
+ public void setUp() throws Exception {
+ response = new MRPublisherResponse();
+
+ }
+
+ @After
+ public void tearDown() throws Exception {
+
+ }
- @Before
- public void setUp() throws Exception {
- response = new MRPublisherResponse();
+ @Test
+ public void testGetResponseCode() {
- }
+ response.getResponseCode();
+ assertTrue(true);
- @After
- public void tearDown() throws Exception {
+ }
- }
+ @Test
+ public void testSetResponseCode() {
- @Test
- public void testGetResponseCode() {
+ response.setResponseCode("200");
+ assertTrue(true);
- response.getResponseCode();
- assertTrue(true);
+ }
- }
-
- @Test
- public void testSetResponseCode() {
+ @Test
+ public void testGetResponseMessage() {
- response.setResponseCode("200");
- assertTrue(true);
+ response.getResponseMessage();
+ assertTrue(true);
- }
-
- @Test
- public void testGetResponseMessage() {
+ }
- response.getResponseMessage();
- assertTrue(true);
+ @Test
+ public void testSetResponseMessage() {
- }
+ response.setResponseMessage("responseMessage");
+ assertTrue(true);
- @Test
- public void testSetResponseMessage() {
+ }
- response.setResponseMessage("responseMessage");
- assertTrue(true);
+ @Test
+ public void testGetPendingMsgs() {
- }
+ response.getPendingMsgs();
+ assertTrue(true);
- @Test
- public void testGetPendingMsgs() {
+ }
- response.getPendingMsgs();
- assertTrue(true);
+ @Test
+ public void testSetPendingMsgs() {
- }
+ response.setPendingMsgs(5);
+ assertTrue(true);
- @Test
- public void testSetPendingMsgs() {
+ }
- response.setPendingMsgs(5);
- assertTrue(true);
+ @Test
+ public void testToString() {
- }
-
- @Test
- public void testToString() {
+ response.toString();
+ assertTrue(true);
- response.toString();
- assertTrue(true);
+ }
- }
-
}
diff --git a/src/test/java/org/onap/dmaap/mr/client/response/TestRunner.java b/src/test/java/org/onap/dmaap/mr/client/response/TestRunner.java
index a5f43d4..c301551 100644
--- a/src/test/java/org/onap/dmaap/mr/client/response/TestRunner.java
+++ b/src/test/java/org/onap/dmaap/mr/client/response/TestRunner.java
@@ -4,12 +4,14 @@
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright © 2021 Orange.
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -27,16 +29,16 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class TestRunner {
- private static final Logger LOGGER = LoggerFactory.getLogger(TestRunner.class);
+ private static final Logger logger = LoggerFactory.getLogger(TestRunner.class);
+
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ Result result = JUnitCore.runClasses(JUnitTestSuite.class);
+ for (Failure failure : result.getFailures()) {
+ logger.info(failure.toString());
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Result result = JUnitCore.runClasses(JUnitTestSuite.class);
- for (Failure failure : result.getFailures()) {
- LOGGER.info(failure.toString());
-
- }
- LOGGER.info(String.valueOf(result.wasSuccessful()));
- }
+ }
+ logger.info(String.valueOf(result.wasSuccessful()));
+ }
}