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

            //Assert
            Assert.IsNull(response);
        }
Exemplo n.º 2
0
        public void MapFromDomainEntity_ValidEntity_ReturnDTOEntity()
        {
            //Arrange
            var businessRisk = new BusinessRiskDTO()
            {
                Id       = Guid.NewGuid(),
                Value    = "Security",
                Position = 0
            };
            var response = BusinessRisk.MapFromDomainEntity(businessRisk);

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