public void ShouldMapZeroToAnEntityNullableNonEntityIdMember()
        {
            var source = new CategoryDto {
                Name = "Root Category", ParentId = 0, TopProductIdentifier = 0
            };
            var result = source.Map().ToANew <CategoryEntity>();

            result.ParentId.ShouldBeNull();
            result.TopProductIdentifier.ShouldBe(0);
        }
示例#2
0
 public static Category BuildCategory(CategoryDto categoryDto) => categoryDto.Map <CategoryDto, Category>();