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.
abp/framework/test/Volo.Abp.ObjectMapping.Tests/Volo/Abp/ObjectMapping/ContextSpecificMapper_Tests.cs

24 lines
895 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>));
}
}
}