Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
开发团队
Flowable Engine
提交
84231016
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,发现更多精彩内容 >>
提交
84231016
编写于
4月 28, 2014
作者:
T
tijsrademakers
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix CDI test issues
上级
90c0028a
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
20 addition
and
11 deletion
+20
-11
modules/activiti-engine/src/main/java/org/activiti/engine/EngineServices.java
...ine/src/main/java/org/activiti/engine/EngineServices.java
+2
-0
modules/activiti-engine/src/main/java/org/activiti/engine/impl/cfg/ProcessEngineConfigurationImpl.java
...iviti/engine/impl/cfg/ProcessEngineConfigurationImpl.java
+4
-0
modules/activiti-engine/src/main/java/org/activiti/engine/test/ActivitiRule.java
.../src/main/java/org/activiti/engine/test/ActivitiRule.java
+12
-9
modules/activiti-spring/src/test/java/org/activiti/spring/test/junit4/SpringJunit4Test.java
...ava/org/activiti/spring/test/junit4/SpringJunit4Test.java
+2
-2
未找到文件。
modules/activiti-engine/src/main/java/org/activiti/engine/EngineServices.java
浏览文件 @
84231016
...
...
@@ -12,6 +12,7 @@
*/
package
org.activiti.engine
;
/**
* Interface implemented by all classes that expose the Activiti services.
*
...
...
@@ -33,4 +34,5 @@ public interface EngineServices {
ManagementService
getManagementService
();
ProcessEngineConfiguration
getProcessEngineConfiguration
();
}
modules/activiti-engine/src/main/java/org/activiti/engine/impl/cfg/ProcessEngineConfigurationImpl.java
浏览文件 @
84231016
...
...
@@ -1429,6 +1429,10 @@ public abstract class ProcessEngineConfigurationImpl extends ProcessEngineConfig
return
this
;
}
public
ProcessEngineConfiguration
getProcessEngineConfiguration
()
{
return
this
;
}
public
Map
<
Class
<
?
>,
SessionFactory
>
getSessionFactories
()
{
return
sessionFactories
;
}
...
...
modules/activiti-engine/src/main/java/org/activiti/engine/test/ActivitiRule.java
浏览文件 @
84231016
...
...
@@ -23,10 +23,10 @@ import org.activiti.engine.HistoryService;
import
org.activiti.engine.IdentityService
;
import
org.activiti.engine.ManagementService
;
import
org.activiti.engine.ProcessEngine
;
import
org.activiti.engine.ProcessEngineConfiguration
;
import
org.activiti.engine.RepositoryService
;
import
org.activiti.engine.RuntimeService
;
import
org.activiti.engine.TaskService
;
import
org.activiti.engine.impl.ProcessEngineImpl
;
import
org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl
;
import
org.activiti.engine.impl.test.TestHelper
;
import
org.activiti.engine.test.mock.ActivitiMockSupport
;
...
...
@@ -88,7 +88,7 @@ public class ActivitiRule implements TestRule {
protected
String
configurationResource
=
"activiti.cfg.xml"
;
protected
String
deploymentId
=
null
;
protected
ProcessEngineConfigurationImpl
processEngineConfiguration
;
protected
ProcessEngineConfiguration
processEngineConfiguration
;
protected
ProcessEngine
processEngine
;
protected
RepositoryService
repositoryService
;
protected
RuntimeService
runtimeService
;
...
...
@@ -108,7 +108,7 @@ public class ActivitiRule implements TestRule {
}
public
ActivitiRule
(
ProcessEngine
processEngine
)
{
setProcessEngine
(
processEngine
);
setProcessEngine
(
processEngine
);
}
/**
...
...
@@ -203,8 +203,11 @@ public class ActivitiRule implements TestRule {
protected
void
starting
(
Description
description
)
{
if
(
processEngine
==
null
)
{
initializeProcessEngine
();
initializeServices
();
}
}
if
(
processEngineConfiguration
==
null
)
{
initializeServices
();
}
if
(
mockSupport
==
null
)
{
initializeMockSupport
();
...
...
@@ -235,7 +238,7 @@ public class ActivitiRule implements TestRule {
}
protected
void
initializeServices
()
{
processEngineConfiguration
=
((
ProcessEngineImpl
)
processEngine
)
.
getProcessEngineConfiguration
();
processEngineConfiguration
=
processEngine
.
getProcessEngineConfiguration
();
repositoryService
=
processEngine
.
getRepositoryService
();
runtimeService
=
processEngine
.
getRuntimeService
();
taskService
=
processEngine
.
getTaskService
();
...
...
@@ -348,9 +351,9 @@ public class ActivitiRule implements TestRule {
this
.
managementService
=
managementService
;
}
public
void
setProcessEngineConfiguration
(
ProcessEngineConfigurationImpl
processEngineConfiguration
)
{
this
.
processEngineConfiguration
=
processEngineConfiguration
;
}
public
void
setProcessEngineConfiguration
(
ProcessEngineConfigurationImpl
processEngineConfiguration
)
{
this
.
processEngineConfiguration
=
processEngineConfiguration
;
}
public
ActivitiMockSupport
getMockSupport
()
{
return
mockSupport
;
...
...
modules/activiti-spring/src/test/java/org/activiti/spring/test/junit4/SpringJunit4Test.java
浏览文件 @
84231016
...
...
@@ -64,8 +64,8 @@ public class SpringJunit4Test {
Task
task
=
taskService
.
createTaskQuery
().
singleResult
();
assertEquals
(
"My Task"
,
task
.
getName
());
// ACT-1186: ActivitiRule services not initialized when using SpringJUnit4ClassRunner together with @ContextConfiguration
assertNotNull
(
activitiSpringRule
.
getRuntimeService
());
// ACT-1186: ActivitiRule services not initialized when using SpringJUnit4ClassRunner together with @ContextConfiguration
assertNotNull
(
activitiSpringRule
.
getRuntimeService
());
taskService
.
complete
(
task
.
getId
());
assertEquals
(
0
,
runtimeService
.
createProcessInstanceQuery
().
count
());
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录