Пример #1
0
        public void MapFromDomainEntity_NullContent_ReturnNull()
        {
            //Act
            var response = AssetCategory.MapFromDomainEntity(null);

            //Assert
            Assert.IsNull(response);
        }
Пример #2
0
        public void MapFromDomainEntity_ValidEntity_ReturnDTOEntity()
        {
            //Arrange
            var assetCategory = new AssetCategoryDTO()
            {
                Id       = Guid.NewGuid(),
                Value    = "5410105 Amortization lease improvements",
                Position = 0
            };
            var response = AssetCategory.MapFromDomainEntity(assetCategory);

            Assert.IsNotNull(response);
            Assert.AreEqual(assetCategory.Id, response.Id);
            Assert.AreEqual(assetCategory.Value, response.Value);
            Assert.AreEqual(assetCategory.Position, response.Position);
        }