From fd8f9858fe2c7dfdee55a1e136a63fb01d1a3162 Mon Sep 17 00:00:00 2001 From: rn509j Date: Sun, 1 Oct 2017 21:36:35 -0400 Subject: [PATCH] commiting code for test coverage changed testcases DMAAP-149 Signed-off-by: rn509j Change-Id: I4dfeb3df44f85bfbd3a10ec1659c8618e31a10fb --- .gitignore | 1 + .project | 23 +++ pom.xml | 80 ++++++++--- .../cambria/service/impl/EventsServiceImpl.java | 7 + .../nsa/cambria/service/impl/TopicServiceImpl.java | 6 + .../metrics/cambria/DMaaPMetricsSenderTest.java | 11 +- .../backends/kafka/KafkaConsumerCacheTest.java | 4 +- .../cambria/backends/kafka/KafkaPublisherTest.java | 16 ++- .../att/nsa/cambria/beans/DMaaPContextTest4.java | 3 + .../cambria/embed/EmbedConfigurationReader.java | 152 ++++++++++++++++++++ .../java/com/att/nsa/cambria/embed/KafkaLocal.java | 58 ++++++++ .../com/att/nsa/cambria/embed/ZooKeeperLocal.java | 59 ++++++++ .../service/impl/EventsServiceImplTest.java | 126 +++++++++++------ .../service/impl/ShowConsumerCacheTest.java | 24 ++-- .../cambria/service/impl/TopicServiceImplTest.java | 37 +++-- .../service/impl/TopicServiceImplTest22.java | 67 ++++----- .../nsa/cambria/utils/ConfigurationReaderTest.java | 55 ++++++++ .../nsa/cambria/utils/DMaaPCuratorFactoryTest.java | 68 +++++++++ .../cambria/utils/DMaaPResponseBuilderTest.java | 140 ++++++++++++++++++ .../java/com/att/nsa/cambria/utils/UtilsTest.java | 67 +++++++++ src/test/resources/DMaaPErrorMesaages.properties | 59 ++++++++ src/test/resources/MsgRtrApi.properties | 156 +++++++++++++++++++++ src/test/resources/spring-context.xml | 120 ++++++++++++++++ 23 files changed, 1202 insertions(+), 137 deletions(-) create mode 100644 .project create mode 100644 src/test/java/com/att/nsa/cambria/embed/EmbedConfigurationReader.java create mode 100644 src/test/java/com/att/nsa/cambria/embed/KafkaLocal.java create mode 100644 src/test/java/com/att/nsa/cambria/embed/ZooKeeperLocal.java create mode 100644 src/test/java/com/att/nsa/cambria/utils/ConfigurationReaderTest.java create mode 100644 src/test/java/com/att/nsa/cambria/utils/DMaaPCuratorFactoryTest.java create mode 100644 src/test/java/com/att/nsa/cambria/utils/DMaaPResponseBuilderTest.java create mode 100644 src/test/resources/DMaaPErrorMesaages.properties create mode 100644 src/test/resources/MsgRtrApi.properties create mode 100644 src/test/resources/spring-context.xml diff --git a/.gitignore b/.gitignore index b83d222..0f63015 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /target/ +/bin/ diff --git a/.project b/.project new file mode 100644 index 0000000..885141a --- /dev/null +++ b/.project @@ -0,0 +1,23 @@ + + + msgrtr + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/pom.xml b/pom.xml index eaf44cd..09ef27f 100644 --- a/pom.xml +++ b/pom.xml @@ -273,6 +273,42 @@ gson 2.8.0 + + org.mockito + mockito-all + 1.9.5 + test + + + + + com.fasterxml.jackson.core + jackson-core + 2.8.5 + test + + + + org.powermock + powermock-api-mockito + 1.5.6 + test + + + + org.powermock + powermock-module-junit4 + 1.5.6 + test + + + + org.powermock + powermock-module-junit4-rule + 1.5.6 + test + + DMaaP @@ -344,8 +380,8 @@ 2.12.4 - + @@ -361,13 +397,13 @@ - + + Note: This exclusion list should match + property above **/gen/** **/generated-sources/** @@ -376,29 +412,29 @@ - + pre-unit-test prepare-agent - + Sets the path to the file which contains the execution data. ${project.build.directory}/code-coverage/jacoco-ut.exec - + surefireArgLine - + post-unit-test test @@ -406,9 +442,9 @@ report - + Sets the path to the file which contains the execution data. ${project.build.directory}/code-coverage/jacoco-ut.exec - + Sets the output directory for the code coverage report. ${project.reporting.outputDirectory}/jacoco-ut @@ -419,19 +455,19 @@ prepare-agent - + Sets the path to the file which contains the execution data. ${project.build.directory}/code-coverage/jacoco-it.exec - + failsafeArgLine - + post-integration-test post-integration-test @@ -439,15 +475,15 @@ report - + Sets the path to the file which contains the execution data. ${project.build.directory}/code-coverage/jacoco-it.exec - + Sets the output directory for the code coverage report. ${project.reporting.outputDirectory}/jacoco-it - + --> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file -- 2.16.6