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

            //Assert
            Assert.IsNull(response);
        }
Ejemplo n.º 2
0
        public void MapFromDomainEntity_ValidEntity_ReturnDTOEntity()
        {
            //Arrange
            var region = new Region()
            {
                Id       = Guid.NewGuid(),
                Value    = "AMER",
                Position = 0
            };
            var response = RegionDTO.MapFromDatabaseEntity(region);

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