aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrn509j <rn509j@att.com>2017-10-02 18:50:45 -0400
committerrn509j <rn509j@att.com>2017-10-02 18:53:50 -0400
commitd0fd7a9c0aca788fa5fc9109c382c57791662772 (patch)
tree18c816db9d39be37bfa0a4b1f8100f72de64b95f
parent6a8bbf5d648e5c0cd95de4c89a479ae5ea5b44bc (diff)
commiting code for test coverage
DMAAP-149 Signed-off-by: rn509j <rn509j@att.com> Change-Id: Ie339f3458b08d67786b05bb7080974e2f1050044
-rw-r--r--.checkstyle24
-rw-r--r--.classpath36
-rw-r--r--.project29
-rw-r--r--.settings/org.eclipse.core.resources.prefs6
-rw-r--r--.settings/org.eclipse.jdt.core.prefs5
-rw-r--r--.settings/org.eclipse.m2e.core.prefs4
-rw-r--r--src/test/java/com/att/nsa/mr/client/MRClientBuildersTest.java28
-rw-r--r--src/test/java/com/att/nsa/mr/client/MRClientFactoryTest.java84
8 files changed, 160 insertions, 56 deletions
diff --git a/.checkstyle b/.checkstyle
new file mode 100644
index 0000000..7adf1e6
--- /dev/null
+++ b/.checkstyle
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<fileset-config file-format-version="1.2.0" simple-config="false" sync-formatter="false">
+ <local-check-config name="maven-checkstyle-plugin check-license" location="jar:file:/C:/Users/rn509j/.m2/repository/org/onap/oparent/checkstyle/0.1.1/checkstyle-0.1.1.jar!/onap-checkstyle/check-license.xml" type="remote" description="maven-checkstyle-plugin configuration check-license">
+ <property name="checkstyle.cache.file" value="${project_loc}/target/checkstyle-cachefile"/>
+ <property name="checkstyle.header.file" value="C:\ONAP\.metadata\.plugins\org.eclipse.core.resources\.projects\dmaapClient\com.basistech.m2e.code.quality.checkstyleConfigurator\checkstyle-header-check-license.txt"/>
+ </local-check-config>
+ <local-check-config name="maven-checkstyle-plugin check-style" location="jar:file:/C:/Users/rn509j/.m2/repository/org/onap/oparent/checkstyle/0.1.1/checkstyle-0.1.1.jar!/onap-checkstyle/onap-java-style.xml" type="remote" description="maven-checkstyle-plugin configuration check-style">
+ <property name="checkstyle.cache.file" value="${project_loc}/target/checkstyle-cachefile"/>
+ <property name="checkstyle.header.file" value="C:\ONAP\.metadata\.plugins\org.eclipse.core.resources\.projects\dmaapClient\com.basistech.m2e.code.quality.checkstyleConfigurator\checkstyle-header-check-style.txt"/>
+ </local-check-config>
+ <fileset name="java-sources-check-license" enabled="true" check-config-name="maven-checkstyle-plugin check-license" local="true">
+ <file-match-pattern match-pattern="^src/main/java/.*\.java" include-pattern="true"/>
+ <file-match-pattern match-pattern="^src/test/java/.*\.java" include-pattern="true"/>
+ </fileset>
+ <fileset name="java-sources-check-style" enabled="true" check-config-name="maven-checkstyle-plugin check-style" local="true">
+ <file-match-pattern match-pattern="^src/main/java/src/main/java.*\.java" include-pattern="true"/>
+ <file-match-pattern match-pattern="^src/main/java/.*\.java" include-pattern="true"/>
+ <file-match-pattern match-pattern="^src/test/java/.*\.java" include-pattern="true"/>
+ <file-match-pattern match-pattern="^src/main/resources/.*\.properties" include-pattern="true"/>
+ <file-match-pattern match-pattern="^src/main/resources/.*\.properties" include-pattern="true"/>
+ <file-match-pattern match-pattern="^src/test/resources/.*\.properties" include-pattern="true"/>
+ </fileset>
+</fileset-config>
diff --git a/.classpath b/.classpath
new file mode 100644
index 0000000..33c6220
--- /dev/null
+++ b/.classpath
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/classes" path="src/main/java">
+ <attributes>
+ <attribute name="optional" value="true"/>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java">
+ <attributes>
+ <attribute name="optional" value="true"/>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/.project b/.project
new file mode 100644
index 0000000..10a2e6d
--- /dev/null
+++ b/.project
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>dmaapClient</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ </natures>
+</projectDescription>
diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..04cfa2c
--- /dev/null
+++ b/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,6 @@
+eclipse.preferences.version=1
+encoding//src/main/java=UTF-8
+encoding//src/main/resources=UTF-8
+encoding//src/test/java=UTF-8
+encoding//src/test/resources=UTF-8
+encoding/<project>=UTF-8
diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..bbcbc93
--- /dev/null
+++ b/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,5 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.7
diff --git a/.settings/org.eclipse.m2e.core.prefs b/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..14b697b
--- /dev/null
+++ b/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/src/test/java/com/att/nsa/mr/client/MRClientBuildersTest.java b/src/test/java/com/att/nsa/mr/client/MRClientBuildersTest.java
index 0908779..2e7d05d 100644
--- a/src/test/java/com/att/nsa/mr/client/MRClientBuildersTest.java
+++ b/src/test/java/com/att/nsa/mr/client/MRClientBuildersTest.java
@@ -67,16 +67,16 @@ public class MRClientBuildersTest {
@Test
public void testUsingHosts() {
- /*builder.usingHosts("hostList");
- assertTrue(true);*/
+ builder.usingHosts("hostList");
+ assertTrue(true);
}
@Test
public void testUsingHosts2() {
- /*builder.usingHosts(hostSet);
- assertTrue(true);*/
+ builder.usingHosts(hostSet);
+ assertTrue(true);
}
@@ -143,40 +143,40 @@ public class MRClientBuildersTest {
@Test
public void testUsingHosts3() {
- /*pBuilder.usingHosts("testTopic");
+ pBuilder.usingHosts("testTopic");
assertTrue(true);
-*/
+
}
@Test
public void testUsingHosts4() {
-/* pBuilder.usingHosts(hostArray);
- assertTrue(true);*/
+ pBuilder.usingHosts(hostArray);
+ assertTrue(true);
}
@Test
public void testUsingHosts5() {
-/* pBuilder.usingHosts(hostSet);
- assertTrue(true);*/
+ pBuilder.usingHosts(hostSet);
+ assertTrue(true);
}
@Test
public void testOnTopic2() {
- /* pBuilder.onTopic("testTopic");
- assertTrue(true);*/
+ pBuilder.onTopic("testTopic");
+ assertTrue(true);
}
@Test
public void testLimitBatch() {
- /*pBuilder.limitBatch(100, 10);
- assertTrue(true);*/
+ pBuilder.limitBatch(100, 10);
+ assertTrue(true);
}
diff --git a/src/test/java/com/att/nsa/mr/client/MRClientFactoryTest.java b/src/test/java/com/att/nsa/mr/client/MRClientFactoryTest.java
index 79f52f1..08bf23a 100644
--- a/src/test/java/com/att/nsa/mr/client/MRClientFactoryTest.java
+++ b/src/test/java/com/att/nsa/mr/client/MRClientFactoryTest.java
@@ -64,131 +64,131 @@ public class MRClientFactoryTest {
@Test
public void testCreateConsumer() {
- /*MRClientFactory.createConsumer("hostList hostList2", "testTopic");
+ MRClientFactory.createConsumer("hostList hostList2", "testTopic");
assertTrue(true);
-*/
+
}
@Test
public void testCreateConsumer2() {
- /* MRClientFactory.createConsumer(hostSet, "testTopic");
- assertTrue(true);*/
+ MRClientFactory.createConsumer(hostSet, "testTopic");
+ assertTrue(true);
}
@Test
public void testCreateConsumer3() {
- /*MRClientFactory.createConsumer(hostSet, "testTopic", "filter");
+ MRClientFactory.createConsumer(hostSet, "testTopic", "filter");
assertTrue(true);
-*/
+
}
@Test
public void testCreateConsumer4() {
-// MRClientFactory.createConsumer(hostSet, "testTopic", "CG1", "22");
-// assertTrue(true);
+ MRClientFactory.createConsumer(hostSet, "testTopic", "CG1", "22");
+ assertTrue(true);
}
@Test
public void testCreateConsumer5() {
-/* MRClientFactory.createConsumer(hostSet, "testTopic", "CG1", "22", 100, 100);
- assertTrue(true);*/
+ MRClientFactory.createConsumer(hostSet, "testTopic", "CG1", "22", 100, 100);
+ assertTrue(true);
}
@Test
public void testCreateConsumer6() {
- /* MRClientFactory.createConsumer("hostList", "testTopic", "CG1", "22", 100, 100, "filter", "apikey", "apisecret");
+ MRClientFactory.createConsumer("hostList", "testTopic", "CG1", "22", 100, 100, "filter", "apikey", "apisecret");
assertTrue(true);
-*/
+
}
@Test
public void testCreateConsumer7() {
- /*MRClientFactory.createConsumer(hostSet, "testTopic", "CG1", "22", 100, 100, "filter", "apikey", "apisecret");
- assertTrue(true);*/
+ MRClientFactory.createConsumer(hostSet, "testTopic", "CG1", "22", 100, 100, "filter", "apikey", "apisecret");
+ assertTrue(true);
}
@Test
public void testCreateSimplePublisher() {
-/* MRClientFactory.createSimplePublisher("hostList", "testTopic");
- assertTrue(true);*/
+ MRClientFactory.createSimplePublisher("hostList", "testTopic");
+ assertTrue(true);
}
@Test
public void testCreateBatchingPublisher1() {
-/*
+
MRClientFactory.createBatchingPublisher("hostList", "testTopic", 100, 10);
- assertTrue(true);*/
+ assertTrue(true);
}
@Test
public void testCreateBatchingPublisher2() {
-/*
+
MRClientFactory.createBatchingPublisher("hostList", "testTopic", 100, 10, true);
assertTrue(true);
-*/
+
}
@Test
public void testCreateBatchingPublisher3() {
-/*
+
MRClientFactory.createBatchingPublisher(hostArray, "testTopic", 100, 10, true);
- assertTrue(true);*/
+ assertTrue(true);
}
@Test
public void testCreateBatchingPublisher4() {
-// MRClientFactory.createBatchingPublisher(hostSet, "testTopic", 100, 10, true);
-// assertTrue(true);
+ MRClientFactory.createBatchingPublisher(hostSet, "testTopic", 100, 10, true);
+ assertTrue(true);
}
@Test
public void testCreateBatchingPublisher5() {
-//
-// MRClientFactory.createBatchingPublisher("host", "testTopic", "username", "password", 100, 10, true,
-// "protocolFlag", "/producer");
-// assertTrue(true);
+
+ MRClientFactory.createBatchingPublisher("host", "testTopic", "username", "password", 100, 10, true,
+ "protocolFlag", "/producer");
+ assertTrue(true);
}
@Test
public void testCreateBatchingPublisher6() {
-//
-// try {
-// MRClientFactory.createBatchingPublisher("/producer");
-// } catch (IOException e) {
-// // TODO Auto-generated catch block
-// e.printStackTrace();
-// }
-// assertTrue(true);
+
+ try {
+ MRClientFactory.createBatchingPublisher("/producer");
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ assertTrue(true);
}
@Test
public void testCreateBatchingPublisher7() {
- /* try {
+ try {
MRClientFactory.createBatchingPublisher("/producer", true);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
- assertTrue(true);*/
+ assertTrue(true);
}
@@ -227,20 +227,20 @@ public class MRClientFactoryTest {
@Test
public void testCreateConsumer9() {
- /*MRClientFactory.createConsumer("host", "topic", "username", "password", "group", "23", "protocolFlag",
+ MRClientFactory.createConsumer("host", "topic", "username", "password", "group", "23", "protocolFlag",
"/consumer", 1, 2);
assertTrue(true);
-*/
+
}
@Test
public void testCreateConsumer10() {
- /*MRClientFactory.createConsumer("host", "topic", "username", "password", "group", "23", 1, 2, "protocolFlag",
+ MRClientFactory.createConsumer("host", "topic", "username", "password", "group", "23", 1, 2, "protocolFlag",
"/consumer");
- assertTrue(true);*/
+ assertTrue(true);
}