Esempio n. 1
0
        public void MapFromDomainEntity_NullContent_ReturnNull()
        {
            //Act
            var response = RealEstateOrBauDTO.MapFromDatabaseEntity(null);

            //Assert
            Assert.IsNull(response);
        }
Esempio n. 2
0
        public void MapFromDomainEntity_ValidEntity_ReturnDTOEntity()
        {
            //Arrange
            var realEstateOrBauDTO = new RealEstateOrBau()
            {
                Id       = Guid.NewGuid(),
                Value    = "AMER",
                Position = 0
            };
            var response = RealEstateOrBauDTO.MapFromDatabaseEntity(realEstateOrBauDTO);

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