summaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorAndrew Gauld <agauld@att.com>2020-01-17 21:32:54 +0000
committerAndrew Gauld <agauld@att.com>2020-01-17 21:34:31 +0000
commit86a040e87585d176dee6f215d5d46a2a74c1366e (patch)
tree762857cc4e15766b923dbda4ea21c48d87106368 /mod
parent5fda209b043e1cc1d1502cc8654bb72643868fb3 (diff)
mod/genprocessor code coverage in SONAR
Change-Id: I51bd4efd2db17e35d1b28fed32c448fae209e3ba Issue-ID: DCAEGEN2-1860 Signed-off-by: Andrew Gauld <agauld@att.com>
Diffstat (limited to 'mod')
-rw-r--r--mod/genprocessor/pom.xml32
-rw-r--r--mod/genprocessor/src/test/java/sandbox/AppTest.java18
2 files changed, 34 insertions, 16 deletions
diff --git a/mod/genprocessor/pom.xml b/mod/genprocessor/pom.xml
index b28c888..6caf715 100644
--- a/mod/genprocessor/pom.xml
+++ b/mod/genprocessor/pom.xml
@@ -2,22 +2,22 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>org.onap.dcaegen2.platform.mod</groupId>
- <artifactId>genprocessor</artifactId>
- <version>1.0.0</version>
-
- <name>dcaegen2-platform-mod-genprocessor</name>
- <!-- FIXME change it to the project's website -->
- <url>http://www.example.com</url>
-
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <maven.compiler.source>1.8</maven.compiler.source>
- <maven.compiler.target>1.8</maven.compiler.target>
- </properties>
-
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.onap.oparent</groupId>
+ <artifactId>oparent</artifactId>
+ <version>2.0.0</version>
+ </parent>
+ <groupId>org.onap.dcaegen2.platform.mod</groupId>
+ <artifactId>genprocessor</artifactId>
+ <version>1.0.0</version>
+ <name>dcaegen2-platform-mod-genprocessor</name>
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <maven.deploy.skip>true</maven.deploy.skip>
+ <java.version>1.8</java.version>
+ <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
+ </properties>
<dependencies>
<!--NOTE: Nifi jars used here are version 1.9.2 but dcae mod is on 1.9.3 because 1.9.3 is not in
Maven Central -->
diff --git a/mod/genprocessor/src/test/java/sandbox/AppTest.java b/mod/genprocessor/src/test/java/sandbox/AppTest.java
index 3ce8f1a..dddd0fd 100644
--- a/mod/genprocessor/src/test/java/sandbox/AppTest.java
+++ b/mod/genprocessor/src/test/java/sandbox/AppTest.java
@@ -18,9 +18,13 @@
package sandbox;
import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertEquals;
import org.junit.Test;
+import org.onap.dcae.genprocessor.CompSpec;
+import org.onap.dcae.genprocessor.Utils;
+
/**
* Unit test for simple App.
*/
@@ -34,4 +38,18 @@ public class AppTest
{
assertTrue( true );
}
+
+ /**
+ * Test Utils
+ */
+ @Test
+ public void testUtils()
+ {
+ new Utils();
+ assertEquals(Utils.formatNameForJavaClass("part1.a-bee"), "Part1ABee");
+ CompSpec cs = new CompSpec();
+ cs.name = "SomeJar";
+ cs.version = "2.0";
+ assertEquals(Utils.formatNameForJar(cs), "SomeJar-2.0");
+ }
}