Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
开发团队
Flowable Engine
提交
ef513c95
F
Flowable Engine
项目概览
开发团队
/
Flowable Engine
通知
9
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
Flowable Engine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ef513c95
编写于
2月 26, 2015
作者:
S
Saeid Mirzaei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
draft version of unit test archetype
上级
0994575c
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
154 addition
and
0 deletion
+154
-0
tooling/archetypes/activiti-archetype-unittest/pom.xml
tooling/archetypes/activiti-archetype-unittest/pom.xml
+15
-0
tooling/archetypes/activiti-archetype-unittest/src/main/resources/META-INF/maven/archetype.xml
...-unittest/src/main/resources/META-INF/maven/archetype.xml
+15
-0
tooling/archetypes/activiti-archetype-unittest/src/main/resources/archetype-resources/README
...pe-unittest/src/main/resources/archetype-resources/README
+1
-0
tooling/archetypes/activiti-archetype-unittest/src/main/resources/archetype-resources/pom.xml
...e-unittest/src/main/resources/archetype-resources/pom.xml
+33
-0
tooling/archetypes/activiti-archetype-unittest/src/main/resources/archetype-resources/src/test/java/org/activiti/MyUnitTest.java
...type-resources/src/test/java/org/activiti/MyUnitTest.java
+26
-0
tooling/archetypes/activiti-archetype-unittest/src/main/resources/archetype-resources/src/test/resources/activiti.cfg.xml
...s/archetype-resources/src/test/resources/activiti.cfg.xml
+13
-0
tooling/archetypes/activiti-archetype-unittest/src/main/resources/archetype-resources/src/test/resources/log4j.properties
...s/archetype-resources/src/test/resources/log4j.properties
+10
-0
tooling/archetypes/activiti-archetype-unittest/src/main/resources/archetype-resources/src/test/resources/org/activiti/test/my-process.bpmn20.xml
...rc/test/resources/org/activiti/test/my-process.bpmn20.xml
+21
-0
tooling/archetypes/pom.xml
tooling/archetypes/pom.xml
+20
-0
未找到文件。
tooling/archetypes/activiti-archetype-unittest/pom.xml
0 → 100644
浏览文件 @
ef513c95
<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>
<parent>
<groupId>
org.activiti
</groupId>
<artifactId>
archetypes
</artifactId>
<version>
5.17.1-SNAPSHOT
</version>
</parent>
<groupId>
org.activiti.archetypes
</groupId>
<artifactId>
activiti-archetype-unittest
</artifactId>
<description>
Creates a new Activiti unit test.
</description>
<packaging>
jar
</packaging>
</project>
tooling/archetypes/activiti-archetype-unittest/src/main/resources/META-INF/maven/archetype.xml
0 → 100644
浏览文件 @
ef513c95
<archetype
xmlns=
"http://maven.apache.org/plugins/maven-archetype-plugin/archetype/1.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/plugins/maven-archetype-plugin/archetype/1.0.0 http://maven.apache.org/xsd/archetype-1.0.0.xsd"
>
<id>
activiti-archetype-unittest
</id>
<resources>
<resource>
README
</resource>
</resources>
<testSources>
<source>
src/test/java/org/activiti/MyUnitTest.java
</source>
</testSources>
<testResources>
<resource>
src/test/resources/org/activiti/test/my-process.bpmn20.xml
</resource>
<resource>
src/test/resources/activiti.cfg.xml
</resource>
<resource>
src/test/resources/log4j.properties
</resource>
</testResources>
</archetype>
tooling/archetypes/activiti-archetype-unittest/src/main/resources/archetype-resources/README
0 → 100644
浏览文件 @
ef513c95
This is a Maven project which can be used as template when creating a unit test for Activiti.
\ No newline at end of file
tooling/archetypes/activiti-archetype-unittest/src/main/resources/archetype-resources/pom.xml
0 → 100644
浏览文件 @
ef513c95
<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>
${groupId}
</groupId>
<artifactId>
${artifactId}
</artifactId>
<version>
${version}
</version>
<dependencies>
<dependency>
<groupId>
org.activiti
</groupId>
<artifactId>
activiti-engine
</artifactId>
<version>
5.17.1-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<version>
4.11
</version>
</dependency>
<dependency>
<groupId>
com.h2database
</groupId>
<artifactId>
h2
</artifactId>
<version>
1.3.168
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.slf4j
</groupId>
<artifactId>
slf4j-log4j12
</artifactId>
<version>
1.7.5
</version>
</dependency>
</dependencies>
</project>
tooling/archetypes/activiti-archetype-unittest/src/main/resources/archetype-resources/src/test/java/org/activiti/MyUnitTest.java
0 → 100644
浏览文件 @
ef513c95
package
org.activiti
;
import
org.activiti.engine.runtime.ProcessInstance
;
import
org.activiti.engine.task.Task
;
import
org.activiti.engine.test.ActivitiRule
;
import
org.activiti.engine.test.Deployment
;
import
org.junit.Rule
;
import
org.junit.Test
;
import
static
org
.
junit
.
Assert
.*;
public
class
MyUnitTest
{
@Rule
public
ActivitiRule
activitiRule
=
new
ActivitiRule
();
@Test
@Deployment
(
resources
=
{
"org/activiti/test/my-process.bpmn20.xml"
})
public
void
test
()
{
ProcessInstance
processInstance
=
activitiRule
.
getRuntimeService
().
startProcessInstanceByKey
(
"my-process"
);
assertNotNull
(
processInstance
);
Task
task
=
activitiRule
.
getTaskService
().
createTaskQuery
().
singleResult
();
assertEquals
(
"Activiti is awesome!"
,
task
.
getName
());
}
}
tooling/archetypes/activiti-archetype-unittest/src/main/resources/archetype-resources/src/test/resources/activiti.cfg.xml
0 → 100644
浏览文件 @
ef513c95
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns=
"http://www.springframework.org/schema/beans"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"
>
<bean
id=
"processEngineConfiguration"
class=
"org.activiti.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration"
>
<property
name=
"jdbcUrl"
value=
"jdbc:h2:mem:activiti;DB_CLOSE_DELAY=1000"
/>
<property
name=
"jdbcDriver"
value=
"org.h2.Driver"
/>
<property
name=
"jdbcUsername"
value=
"sa"
/>
<property
name=
"jdbcPassword"
value=
""
/>
</bean>
</beans>
tooling/archetypes/activiti-archetype-unittest/src/main/resources/archetype-resources/src/test/resources/log4j.properties
0 → 100644
浏览文件 @
ef513c95
log4j.rootLogger
=
DEBUG, CA
# ConsoleAppender
log4j.appender.CA
=
org.apache.log4j.ConsoleAppender
log4j.appender.CA.layout
=
org.apache.log4j.PatternLayout
log4j.appender.CA.layout.ConversionPattern
=
%d{hh:mm:ss,SSS} [%t] %-5p %c %x - %m%n
log4j.logger.org.apache.ibatis.level
=
INFO
log4j.logger.javax.activation.level
=
INFO
tooling/archetypes/activiti-archetype-unittest/src/main/resources/archetype-resources/src/test/resources/org/activiti/test/my-process.bpmn20.xml
0 → 100644
浏览文件 @
ef513c95
<?xml version="1.0" encoding="UTF-8"?>
<definitions
xmlns=
"http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:activiti=
"http://activiti.org/bpmn"
xmlns:bpmndi=
"http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:omgdc=
"http://www.omg.org/spec/DD/20100524/DC"
xmlns:omgdi=
"http://www.omg.org/spec/DD/20100524/DI"
typeLanguage=
"http://www.w3.org/2001/XMLSchema"
expressionLanguage=
"http://www.w3.org/1999/XPath"
targetNamespace=
"http://www.activiti.org/test"
>
<process
id=
"my-process"
>
<startEvent
id=
"start"
/>
<sequenceFlow
id=
"flow1"
sourceRef=
"start"
targetRef=
"someTask"
/>
<userTask
id=
"someTask"
name=
"Activiti is awesome!"
/>
<sequenceFlow
id=
"flow2"
sourceRef=
"someTask"
targetRef=
"end"
/>
<endEvent
id=
"end"
/>
</process>
</definitions>
\ No newline at end of file
tooling/archetypes/pom.xml
0 → 100644
浏览文件 @
ef513c95
<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>
<parent>
<groupId>
org.activiti
</groupId>
<artifactId>
activiti-root
</artifactId>
<relativePath>
../..
</relativePath>
<version>
5.17.1-SNAPSHOT
</version>
</parent>
<artifactId>
archetypes
</artifactId>
<name>
Activiti Archetypes
</name>
<description>
Activiti Archetypes
</description>
<packaging>
pom
</packaging>
</project>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录