Add unit test for config 53/15753/2
authorLvbo163 <lv.bo163@zte.com.cn>
Wed, 27 Sep 2017 01:45:44 +0000 (09:45 +0800)
committerLvbo163 <lv.bo163@zte.com.cn>
Wed, 27 Sep 2017 01:51:28 +0000 (09:51 +0800)
Issue-ID: SDC-403

Change-Id: I5acdc670e274631225608899f24349bd037e5067
Signed-off-by: Lvbo163 <lv.bo163@zte.com.cn>
sdc-workflow-designer-server/pom.xml
sdc-workflow-designer-server/src/main/resources/bpmn.config.properties [new file with mode: 0644]
sdc-workflow-designer-server/src/test/java/org/onap/sdc/workflowdesigner/config/ConfigTest.java [new file with mode: 0644]

index 3ba7f3b..53daad1 100644 (file)
@@ -29,6 +29,9 @@
         <slf4j.version>1.7.25</slf4j.version>
         <jackson.version>2.9.1</jackson.version>
         <velocity.version>1.6.2</velocity.version>
+        <junit.version>4.10</junit.version>
+        <logback.version>1.1.3</logback.version>
+        <logback-classic.version>1.1.3</logback-classic.version>
     </properties>
     <dependencies>
         <dependency>
             <artifactId>velocity</artifactId>
             <version>${velocity.version}</version>
         </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>${junit.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-core</artifactId>
+            <version>${logback.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-classic</artifactId>
+            <version>${logback-classic.version}</version>
+        </dependency>
     </dependencies>
 </project>
diff --git a/sdc-workflow-designer-server/src/main/resources/bpmn.config.properties b/sdc-workflow-designer-server/src/main/resources/bpmn.config.properties
new file mode 100644 (file)
index 0000000..3b35cd6
--- /dev/null
@@ -0,0 +1,2 @@
+handlerClass=org.onap.workflow.activitiext.restservicetask.HttpUtil\r
+templatePath=bpmn-templates/\r
diff --git a/sdc-workflow-designer-server/src/test/java/org/onap/sdc/workflowdesigner/config/ConfigTest.java b/sdc-workflow-designer-server/src/test/java/org/onap/sdc/workflowdesigner/config/ConfigTest.java
new file mode 100644 (file)
index 0000000..22c9a52
--- /dev/null
@@ -0,0 +1,26 @@
+/**\r
+ * Copyright (c) 2017 ZTE Corporation.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * and the Apache License 2.0 which both accompany this distribution,\r
+ * and are available at http://www.eclipse.org/legal/epl-v10.html\r
+ * and http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Contributors:\r
+ *     ZTE - initial API and implementation and/or initial documentation\r
+ */\r
+package org.onap.sdc.workflowdesigner.config;\r
+\r
+import static org.junit.Assert.assertEquals;\r
+\r
+import org.apache.velocity.exception.ParseErrorException;\r
+import org.apache.velocity.exception.ResourceNotFoundException;\r
+import org.junit.Test;\r
+\r
+public class ConfigTest {\r
+    @Test\r
+    public void testLoad() throws ResourceNotFoundException, ParseErrorException, Exception {\r
+        assertEquals(Config.PROPERTIES.get(Config.HANDLER_ClASS),\r
+                "org.onap.workflow.activitiext.restservicetask.HttpUtil");\r
+    }\r
+}\r