Open Source Web Application Framework for ASP.NET Core
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.
 
 
 
 
 
 

23 lines
834 B

using Shouldly;
using Xunit;
namespace Volo.Abp.ObjectMapping;
public class ContextSpecificMapper_Tests : AbpObjectMappingTestBase
{
[Fact]
public void Should_Resolve_Correct_ObjectMappper_For_Specific_Context()
{
GetRequiredService<IObjectMapper<MappingContext1>>()
.ShouldBeOfType(typeof(DefaultObjectMapper<MappingContext1>));
GetRequiredService<IAutoObjectMappingProvider<MappingContext1>>()
.ShouldBeOfType(typeof(Test1AutoObjectMappingProvider<MappingContext1>));
GetRequiredService<IObjectMapper<MappingContext2>>()
.ShouldBeOfType(typeof(DefaultObjectMapper<MappingContext2>));
GetRequiredService<IAutoObjectMappingProvider<MappingContext2>>()
.ShouldBeOfType(typeof(Test2AutoObjectMappingProvider<MappingContext2>));
}
}