From: Lvbo163 Date: Wed, 27 Sep 2017 01:45:44 +0000 (+0800) Subject: Add unit test for config X-Git-Tag: v1.0.0~22 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=49d669b567cfb3024c9a40bb962809f73455ff11;p=sdc%2Fsdc-workflow-designer.git Add unit test for config Issue-ID: SDC-403 Change-Id: I5acdc670e274631225608899f24349bd037e5067 Signed-off-by: Lvbo163 --- 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 @@ 1.7.25 2.9.1 1.6.2 + 4.10 + 1.1.3 + 1.1.3 @@ -51,5 +54,20 @@ velocity ${velocity.version} + + junit + junit + ${junit.version} + + + ch.qos.logback + logback-core + ${logback.version} + + + ch.qos.logback + logback-classic + ${logback-classic.version} + 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"); + } +}