diff options
author | Lvbo163 <lv.bo163@zte.com.cn> | 2017-09-27 09:45:44 +0800 |
---|---|---|
committer | Lvbo163 <lv.bo163@zte.com.cn> | 2017-09-27 09:51:28 +0800 |
commit | 49d669b567cfb3024c9a40bb962809f73455ff11 (patch) | |
tree | 88977afe2d598a2b86656693ce7ca6f23a6b5c07 | |
parent | 3694205db52ef2b3db5a869ae9e6c3568e616bad (diff) |
Add unit test for config
Issue-ID: SDC-403
Change-Id: I5acdc670e274631225608899f24349bd037e5067
Signed-off-by: Lvbo163 <lv.bo163@zte.com.cn>
3 files changed, 46 insertions, 0 deletions
diff --git a/sdc-workflow-designer-server/pom.xml b/sdc-workflow-designer-server/pom.xml index 3ba7f3b9..53daad1f 100644 --- a/sdc-workflow-designer-server/pom.xml +++ b/sdc-workflow-designer-server/pom.xml @@ -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> @@ -51,5 +54,20 @@ <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 index 00000000..3b35cd66 --- /dev/null +++ b/sdc-workflow-designer-server/src/main/resources/bpmn.config.properties @@ -0,0 +1,2 @@ +handlerClass=org.onap.workflow.activitiext.restservicetask.HttpUtil
+templatePath=bpmn-templates/
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 index 00000000..22c9a52e --- /dev/null +++ b/sdc-workflow-designer-server/src/test/java/org/onap/sdc/workflowdesigner/config/ConfigTest.java @@ -0,0 +1,26 @@ +/**
+ * Copyright (c) 2017 ZTE Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * and the Apache License 2.0 which both accompany this distribution,
+ * and are available at http://www.eclipse.org/legal/epl-v10.html
+ * and http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Contributors:
+ * ZTE - initial API and implementation and/or initial documentation
+ */
+package org.onap.sdc.workflowdesigner.config;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.velocity.exception.ParseErrorException;
+import org.apache.velocity.exception.ResourceNotFoundException;
+import org.junit.Test;
+
+public class ConfigTest {
+ @Test
+ public void testLoad() throws ResourceNotFoundException, ParseErrorException, Exception {
+ assertEquals(Config.PROPERTIES.get(Config.HANDLER_ClASS),
+ "org.onap.workflow.activitiext.restservicetask.HttpUtil");
+ }
+}
|