mirror of https://github.com/abpframework/abp.git
63 changed files with 62 additions and 60 deletions
@ -1,8 +1,8 @@ |
|||
using System; |
|||
using System.Linq; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Volo.DependencyInjection; |
|||
|
|||
namespace Volo.DependencyInjection |
|||
namespace Microsoft.Extensions.DependencyInjection |
|||
{ |
|||
public static class CommonServiceCollectionExtensions |
|||
{ |
|||
@ -1,31 +1,29 @@ |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Shouldly; |
|||
using Volo.Abp.Tests.Modularity; |
|||
using Volo.Abp; |
|||
using Volo.Abp.Modularity; |
|||
using Xunit; |
|||
|
|||
namespace Volo.Abp.Tests |
|||
public class AbpApplication_Tests |
|||
{ |
|||
public class AbpApplication_Tests |
|||
[Fact] |
|||
public void Should_Initialize_SingleModule_Application() |
|||
{ |
|||
[Fact] |
|||
public void Should_Initialize_SingleModule_Application() |
|||
{ |
|||
//Arrange
|
|||
//Arrange
|
|||
|
|||
var services = new ServiceCollection(); |
|||
var services = new ServiceCollection(); |
|||
|
|||
using (var application = AbpApplication.Create<IndependentEmptyModule>(services)) |
|||
{ |
|||
//Act
|
|||
using (var application = AbpApplication.Create<IndependentEmptyModule>(services)) |
|||
{ |
|||
//Act
|
|||
|
|||
application.Initialize(services.BuildServiceProvider()); |
|||
application.Initialize(services.BuildServiceProvider()); |
|||
|
|||
//Assert
|
|||
//Assert
|
|||
|
|||
var module = application.ServiceProvider.GetRequiredService<IndependentEmptyModule>(); |
|||
module.ConfigureServicesIsCalled.ShouldBeTrue(); |
|||
module.OnApplicationInitializeIsCalled.ShouldBeTrue(); |
|||
} |
|||
var module = application.ServiceProvider.GetRequiredService<IndependentEmptyModule>(); |
|||
module.ConfigureServicesIsCalled.ShouldBeTrue(); |
|||
module.OnApplicationInitializeIsCalled.ShouldBeTrue(); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -1,7 +1,6 @@ |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Volo.Abp.Modularity; |
|||
|
|||
namespace Volo.Abp.Tests.Modularity |
|||
namespace Volo.Abp.Modularity |
|||
{ |
|||
public class IndependentEmptyModule : AbpModule |
|||
{ |
|||
@ -1,9 +1,8 @@ |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Shouldly; |
|||
using Volo.Abp.Modularity; |
|||
using Xunit; |
|||
|
|||
namespace Volo.Abp.Tests.Modularity |
|||
namespace Volo.Abp.Modularity |
|||
{ |
|||
public class ModuleLoader_Tests |
|||
{ |
|||
@ -1,8 +1,8 @@ |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Shouldly; |
|||
using Shouldly; |
|||
using Volo.DependencyInjection; |
|||
using Xunit; |
|||
|
|||
namespace Volo.DependencyInjection.Tests |
|||
namespace Microsoft.Extensions.DependencyInjection |
|||
{ |
|||
public class AbpConventionalDependencyInjectionExtensions_Tests |
|||
{ |
|||
@ -1,9 +1,8 @@ |
|||
using System; |
|||
using System.Linq; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Shouldly; |
|||
|
|||
namespace Volo.DependencyInjection.Tests |
|||
namespace Microsoft.Extensions.DependencyInjection |
|||
{ |
|||
public static class ServiceCollectionShouldlyExtensions |
|||
{ |
|||
Loading…
Reference in new issue