From a526154fefea7bad5a9c217e3f1dbe83ef5dfa7b Mon Sep 17 00:00:00 2001 From: zhouhao Date: Fri, 22 Jun 2018 18:36:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...DefaultCandidateDimensionParserTest.groovy | 10 ++-- .../web/workflow/flowable/ControllerTest.java | 57 ------------------- hsweb-system/pom.xml | 1 + 3 files changed, 6 insertions(+), 62 deletions(-) delete mode 100644 hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/test/java/org/hswebframework/web/workflow/flowable/ControllerTest.java diff --git a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/test/java/org/hswebframework/web/workflow/dimension/DefaultCandidateDimensionParserTest.groovy b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/test/java/org/hswebframework/web/workflow/dimension/DefaultCandidateDimensionParserTest.groovy index 6cd00b981..c9bf29530 100644 --- a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/test/java/org/hswebframework/web/workflow/dimension/DefaultCandidateDimensionParserTest.groovy +++ b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/test/java/org/hswebframework/web/workflow/dimension/DefaultCandidateDimensionParserTest.groovy @@ -23,7 +23,7 @@ class DefaultCandidateDimensionParserTest extends Specification { setup: def config = """ {"type":"user","idList":["admin"]} """ and: - def dimension = parser.parse(config) + def dimension = parser.parse(null,config) expect: dimension != null dimension.getCandidateUserIdList() != null @@ -35,7 +35,7 @@ class DefaultCandidateDimensionParserTest extends Specification { setup: def config = """ {"type":"role","idList":["admin"]} """ and: - def dimension = parser.parse(config) + def dimension = parser.parse(null,config) expect: dimension != null dimension.getCandidateUserIdList() != null @@ -47,7 +47,7 @@ class DefaultCandidateDimensionParserTest extends Specification { setup: def config = """ {"type":"position","idList":["test"],"tree":"parent"} """ and: - def dimension = parser.parse(config) + def dimension = parser.parse(null,config) expect: dimension != null dimension.getCandidateUserIdList() != null @@ -58,7 +58,7 @@ class DefaultCandidateDimensionParserTest extends Specification { setup: def config = """ {"type":"department","idList":["test"]} """ and: - def dimension = parser.parse(config) + def dimension = parser.parse(null,config) expect: dimension != null dimension.getCandidateUserIdList() != null @@ -69,7 +69,7 @@ class DefaultCandidateDimensionParserTest extends Specification { setup: def config = """ {"type":"org","idList":["test"]} """ and: - def dimension = parser.parse(config) + def dimension = parser.parse(null,config) expect: dimension != null dimension.getCandidateUserIdList() != null diff --git a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/test/java/org/hswebframework/web/workflow/flowable/ControllerTest.java b/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/test/java/org/hswebframework/web/workflow/flowable/ControllerTest.java deleted file mode 100644 index 8bd449a33..000000000 --- a/hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/test/java/org/hswebframework/web/workflow/flowable/ControllerTest.java +++ /dev/null @@ -1,57 +0,0 @@ -package org.hswebframework.web.workflow.flowable; - - -import com.alibaba.fastjson.JSONObject; -import org.activiti.engine.impl.interceptor.SessionFactory; -import org.activiti.spring.boot.ProcessEngineConfigurationConfigurer; -import org.hswebframework.web.tests.SimpleWebApplicationTests; -import org.junit.Assert; -import org.junit.Test; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Configuration; - -import java.util.List; - -/** - * @Author wangwei - * @Date 2017/8/1. - */ -@Configuration -@ComponentScan("org.hswebframework.web.workflow") -public class ControllerTest extends SimpleWebApplicationTests { - - @Test - public void testRest() throws Exception { - //todo 获取所有可办理流程 - JSONObject result = testGet("/workflow/process/definition").exec().resultAsJson(); - Assert.assertNotNull( result.getJSONObject("result")); - Assert.assertEquals(200, result.get("status")); - System.out.println(result); - } - - - @Configuration - public static class config { - @Autowired(required = false) - private List sessionFactories; - - @Bean - public ProcessEngineConfigurationConfigurer processEngineConfigurationConfigurer() { - return configuration -> { - configuration - .setAsyncExecutorActivate(false) - .setJobExecutorActivate(false) - .setDatabaseSchemaUpdate("false") - .setActivityFontName("宋体") - .setLabelFontName("宋体") - .setAnnotationFontName("宋体"); - - if (sessionFactories != null) { - configuration.setCustomSessionFactories(sessionFactories); - } - }; - } - } -} diff --git a/hsweb-system/pom.xml b/hsweb-system/pom.xml index a4ec59cb1..984718aa1 100644 --- a/hsweb-system/pom.xml +++ b/hsweb-system/pom.xml @@ -6,6 +6,7 @@ hsweb-framework org.hswebframework.web 3.0.0-RC-SNAPSHOT + ../pom.xml 4.0.0