using Microsoft.Extensions.DependencyInjection; using Shouldly; using System; using Volo.Abp.AutoMapper.SampleClasses; using Volo.Abp.ObjectMapping; using Volo.Abp.Testing; using Xunit; namespace Volo.Abp.AutoMapper { public class ObjectMapperExtensions_Tests : AbpIntegratedTest { private readonly IObjectMapper _objectMapper; public ObjectMapperExtensions_Tests() { _objectMapper = ServiceProvider.GetRequiredService(); } [Fact] public void Should_Map_Objects_With_AutoMap_Attributes() { var dto = _objectMapper.Map( new MyEntity { Number = 42 } ); dto.As().Number.ShouldBe(42); } } }