Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
z_stack
Activiti
提交
435f7679
A
Activiti
项目概览
z_stack
/
Activiti
12 个月 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
Activiti
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
435f7679
编写于
2月 06, 2019
作者:
M
Miguel Ruiz
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add checks to event entities
上级
eed1b0ad
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
64 addition
and
32 deletion
+64
-32
activiti-spring-conformance-tests/activiti-spring-conformance-variables/src/test/java/org/activiti/spring/conformance/variables/ProcessVariablesTest.java
...ti/spring/conformance/variables/ProcessVariablesTest.java
+32
-18
activiti-spring-conformance-tests/activiti-spring-conformance-variables/src/test/java/org/activiti/spring/conformance/variables/TaskVariablesTest.java
...iviti/spring/conformance/variables/TaskVariablesTest.java
+32
-14
未找到文件。
activiti-spring-conformance-tests/activiti-spring-conformance-variables/src/test/java/org/activiti/spring/conformance/variables/ProcessVariablesTest.java
浏览文件 @
435f7679
...
...
@@ -14,11 +14,7 @@ import org.activiti.api.process.runtime.ProcessAdminRuntime;
import
org.activiti.api.process.runtime.ProcessRuntime
;
import
org.activiti.api.runtime.shared.query.Page
;
import
org.activiti.api.runtime.shared.query.Pageable
;
import
org.activiti.api.task.model.Task
;
import
org.activiti.api.task.model.builders.GetTaskVariablesPayloadBuilder
;
import
org.activiti.api.task.model.builders.SetTaskVariablesPayloadBuilder
;
import
org.activiti.api.task.model.events.TaskRuntimeEvent
;
import
org.activiti.api.task.runtime.TaskRuntime
;
import
org.activiti.spring.conformance.util.security.SecurityUtil
;
import
org.junit.After
;
import
org.junit.Before
;
...
...
@@ -68,11 +64,11 @@ public class ProcessVariablesTest {
setVariables
();
VariableInstance
variableOne
=
variableInstanceList
.
get
(
0
);
String
valueOne
=
variableOne
.
getValue
(
);
assertThat
(
valueOne
).
isEqualTo
(
"variableOne"
);
String
nameOne
=
variableOne
.
getName
(
);
assertThat
(
nameOne
).
isEqualTo
(
"one"
);
VariableInstance
variableOne
Runtime
=
variableInstanceList
.
get
(
0
);
VariableInstance
variableOneEvent
=
((
VariableInstance
)
collectedEvents
.
get
(
0
).
getEntity
()
);
assertThat
(
variableOneRuntime
.
getName
()).
isEqualTo
(
variableOneEvent
.
getName
()
);
assertThat
(
(
String
)
variableOneRuntime
.
getValue
()).
isEqualTo
(
variableOneEvent
.
getValue
()
);
assertThat
(
collectedEvents
)
.
extracting
(
RuntimeEvent:
:
getEventType
)
...
...
@@ -91,9 +87,14 @@ public class ProcessVariablesTest {
setVariables
();
VariableInstance
variableOne
=
variableInstanceList
.
get
(
0
);
assertThat
(
variableOne
.
getTaskId
()).
isNull
();
assertThat
(
variableOne
.
getProcessInstanceId
()).
isEqualTo
(
processInstanceId
);
VariableInstance
variableOneRuntime
=
variableInstanceList
.
get
(
0
);
VariableInstance
variableOneEvent
=
((
VariableInstance
)
collectedEvents
.
get
(
0
).
getEntity
());
assertThat
(
variableOneRuntime
.
getTaskId
()).
isNull
();
assertThat
(
variableOneRuntime
.
getProcessInstanceId
()).
isEqualTo
(
processInstanceId
);
assertThat
(
variableOneRuntime
.
getName
()).
isEqualTo
(
variableOneEvent
.
getName
());
assertThat
((
String
)
variableOneRuntime
.
getValue
()).
isEqualTo
(
variableOneEvent
.
getValue
());
assertThat
(
collectedEvents
)
.
extracting
(
RuntimeEvent:
:
getEventType
)
...
...
@@ -111,8 +112,13 @@ public class ProcessVariablesTest {
setVariables
();
VariableInstance
variableOne
=
variableInstanceList
.
get
(
0
);
assertThat
(
variableOne
.
isTaskVariable
()).
isFalse
();
VariableInstance
variableOneRuntime
=
variableInstanceList
.
get
(
0
);
VariableInstance
variableOneEvent
=
((
VariableInstance
)
collectedEvents
.
get
(
0
).
getEntity
());
assertThat
(
variableOneRuntime
.
isTaskVariable
()).
isFalse
();
assertThat
(
variableOneRuntime
.
getName
()).
isEqualTo
(
variableOneEvent
.
getName
());
assertThat
((
String
)
variableOneRuntime
.
getValue
()).
isEqualTo
(
variableOneEvent
.
getValue
());
assertThat
(
collectedEvents
)
.
extracting
(
RuntimeEvent:
:
getEventType
)
...
...
@@ -130,10 +136,18 @@ public class ProcessVariablesTest {
setVariables
();
VariableInstance
variableOne
=
variableInstanceList
.
get
(
0
);
VariableInstance
variableTwo
=
variableInstanceList
.
get
(
1
);
assertThat
(
variableOne
.
getType
()).
isEqualTo
(
"string"
);
assertThat
(
variableTwo
.
getType
()).
isEqualTo
(
"integer"
);
VariableInstance
variableOneRuntime
=
variableInstanceList
.
get
(
0
);
VariableInstance
variableTwoRuntime
=
variableInstanceList
.
get
(
1
);
VariableInstance
variableOneEvent
=
((
VariableInstance
)
collectedEvents
.
get
(
0
).
getEntity
());
VariableInstance
variableTwoEvent
=
((
VariableInstance
)
collectedEvents
.
get
(
1
).
getEntity
());
assertThat
(
variableOneRuntime
.
getType
()).
isEqualTo
(
"string"
);
assertThat
(
variableTwoRuntime
.
getType
()).
isEqualTo
(
"integer"
);
assertThat
(
variableOneRuntime
.
getName
()).
isEqualTo
(
variableOneEvent
.
getName
());
assertThat
((
String
)
variableOneRuntime
.
getValue
()).
isEqualTo
(
variableOneEvent
.
getValue
());
assertThat
(
variableTwoRuntime
.
getName
()).
isEqualTo
(
variableTwoEvent
.
getName
());
assertThat
((
int
)
variableTwoRuntime
.
getValue
()).
isEqualTo
(
variableTwoEvent
.
getValue
());
assertThat
(
collectedEvents
)
.
extracting
(
RuntimeEvent:
:
getEventType
)
...
...
activiti-spring-conformance-tests/activiti-spring-conformance-variables/src/test/java/org/activiti/spring/conformance/variables/TaskVariablesTest.java
浏览文件 @
435f7679
...
...
@@ -71,11 +71,11 @@ public class TaskVariablesTest {
setVariables
();
VariableInstance
variableOne
=
variableInstanceList
.
get
(
0
);
String
valueOne
=
variableOne
.
getValue
(
);
assertThat
(
valueOne
).
isEqualTo
(
"variableOne"
);
String
nameOne
=
variableOne
.
getName
(
);
assertThat
(
nameOne
).
isEqualTo
(
"one"
);
VariableInstance
variableOne
Runtime
=
variableInstanceList
.
get
(
0
);
VariableInstance
variableOneEvent
=
((
VariableInstance
)
collectedEvents
.
get
(
0
).
getEntity
()
);
assertThat
(
variableOneRuntime
.
getName
()).
isEqualTo
(
variableOneEvent
.
getName
()
);
assertThat
(
(
String
)
variableOneRuntime
.
getValue
()).
isEqualTo
(
variableOneEvent
.
getValue
()
);
assertThat
(
collectedEvents
)
.
extracting
(
RuntimeEvent:
:
getEventType
)
...
...
@@ -94,9 +94,14 @@ public class TaskVariablesTest {
setVariables
();
VariableInstance
variableOne
=
variableInstanceList
.
get
(
0
);
assertThat
(
variableOne
.
getTaskId
()).
isEqualTo
(
taskId
);
assertThat
(
variableOne
.
getProcessInstanceId
()).
isEqualTo
(
processInstanceId
);
VariableInstance
variableOneRuntime
=
variableInstanceList
.
get
(
0
);
VariableInstance
variableOneEvent
=
((
VariableInstance
)
collectedEvents
.
get
(
0
).
getEntity
());
assertThat
(
variableOneRuntime
.
getTaskId
()).
isEqualTo
(
taskId
);
assertThat
(
variableOneRuntime
.
getProcessInstanceId
()).
isEqualTo
(
processInstanceId
);
assertThat
(
variableOneRuntime
.
getName
()).
isEqualTo
(
variableOneEvent
.
getName
());
assertThat
((
String
)
variableOneRuntime
.
getValue
()).
isEqualTo
(
variableOneEvent
.
getValue
());
assertThat
(
collectedEvents
)
.
extracting
(
RuntimeEvent:
:
getEventType
)
...
...
@@ -115,8 +120,13 @@ public class TaskVariablesTest {
setVariables
();
VariableInstance
variableOne
=
variableInstanceList
.
get
(
0
);
assertThat
(
variableOne
.
isTaskVariable
()).
isTrue
();
VariableInstance
variableOneRuntime
=
variableInstanceList
.
get
(
0
);
VariableInstance
variableOneEvent
=
((
VariableInstance
)
collectedEvents
.
get
(
0
).
getEntity
());
assertThat
(
variableOneRuntime
.
isTaskVariable
()).
isTrue
();
assertThat
(
variableOneRuntime
.
getName
()).
isEqualTo
(
variableOneEvent
.
getName
());
assertThat
((
String
)
variableOneRuntime
.
getValue
()).
isEqualTo
(
variableOneEvent
.
getValue
());
assertThat
(
collectedEvents
)
.
extracting
(
RuntimeEvent:
:
getEventType
)
...
...
@@ -134,10 +144,18 @@ public class TaskVariablesTest {
setVariables
();
VariableInstance
variableOne
=
variableInstanceList
.
get
(
0
);
VariableInstance
variableTwo
=
variableInstanceList
.
get
(
1
);
assertThat
(
variableOne
.
getType
()).
isEqualTo
(
"string"
);
assertThat
(
variableTwo
.
getType
()).
isEqualTo
(
"integer"
);
VariableInstance
variableOneRuntime
=
variableInstanceList
.
get
(
0
);
VariableInstance
variableTwoRuntime
=
variableInstanceList
.
get
(
1
);
VariableInstance
variableOneEvent
=
((
VariableInstance
)
collectedEvents
.
get
(
0
).
getEntity
());
VariableInstance
variableTwoEvent
=
((
VariableInstance
)
collectedEvents
.
get
(
1
).
getEntity
());
assertThat
(
variableOneRuntime
.
getType
()).
isEqualTo
(
"string"
);
assertThat
(
variableTwoRuntime
.
getType
()).
isEqualTo
(
"integer"
);
assertThat
(
variableOneRuntime
.
getName
()).
isEqualTo
(
variableOneEvent
.
getName
());
assertThat
((
String
)
variableOneRuntime
.
getValue
()).
isEqualTo
(
variableOneEvent
.
getValue
());
assertThat
(
variableTwoRuntime
.
getName
()).
isEqualTo
(
variableTwoEvent
.
getName
());
assertThat
((
int
)
variableTwoRuntime
.
getValue
()).
isEqualTo
(
variableTwoEvent
.
getValue
());
assertThat
(
collectedEvents
)
.
extracting
(
RuntimeEvent:
:
getEventType
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录