mirror of https://github.com/abpframework/abp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
853 B
32 lines
853 B
using Microsoft.Extensions.DependencyInjection;
|
|
using Shouldly;
|
|
using Volo.Abp.Tests.Modularity;
|
|
using Xunit;
|
|
|
|
namespace Volo.Abp.Tests
|
|
{
|
|
public class AbpApplication_Tests
|
|
{
|
|
[Fact]
|
|
public void Should_Initialize_SingleModule_Application()
|
|
{
|
|
//Arrange
|
|
|
|
var services = new ServiceCollection();
|
|
|
|
using (var application = AbpApplication.Create<IndependentEmptyModule>(services))
|
|
{
|
|
//Act
|
|
|
|
application.Initialize(services.BuildServiceProvider());
|
|
|
|
//Assert
|
|
|
|
var module = application.ServiceProvider.GetRequiredService<IndependentEmptyModule>();
|
|
module.ConfigureServicesIsCalled.ShouldBeTrue();
|
|
module.OnApplicationInitializeIsCalled.ShouldBeTrue();
|
|
}
|
|
}
|
|
}
|
|
}
|