Exemplo n.º 1
0
        public void MapFromDomainEntity_NullContent_ReturnNull()
        {
            //Act
            var response = ChangeOrderReasonDTO.MapFromDatabaseEntity(null);

            //Assert
            Assert.IsNull(response);
        }
Exemplo n.º 2
0
        public void MapFromDomainEntity_ValidEntity_ReturnDTOEntity()
        {
            //Arrange
            var changeOrderReason = new ChangeOrderReason()
            {
                Id       = Guid.NewGuid(),
                Value    = "Client Design Change",
                Position = 0
            };
            var response = ChangeOrderReasonDTO.MapFromDatabaseEntity(changeOrderReason);

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