|
|
|
@ -1,3 +1,7 @@ |
|
|
|
using Microsoft.Extensions.DependencyInjection.Extensions; |
|
|
|
using Volo.Abp.EventBus.Distributed; |
|
|
|
using Volo.Abp.EventBus.Local; |
|
|
|
|
|
|
|
namespace Lion.AbpPro.FileManagement; |
|
|
|
|
|
|
|
[DependsOn( |
|
|
|
@ -10,6 +14,10 @@ public class FileManagementTestBaseModule : AbpModule |
|
|
|
{ |
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context) |
|
|
|
{ |
|
|
|
// 单元测试取消本地事件
|
|
|
|
context.Services.Replace(ServiceDescriptor.Singleton<ILocalEventBus>(NullLocalEventBus.Instance)); |
|
|
|
// 单元测试取消集成事件
|
|
|
|
context.Services.Replace(ServiceDescriptor.Singleton<IDistributedEventBus>(NullDistributedEventBus.Instance)); |
|
|
|
context.Services.AddAlwaysAllowAuthorization(); |
|
|
|
} |
|
|
|
|
|
|
|
|