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

            //Assert
            Assert.IsNull(response);
        }
Exemplo n.º 2
0
        public void MapFromDomainEntity_ValidEntity_ReturnDTOEntity()
        {
            //Arrange
            var facilityType = new FacilityType()
            {
                Id       = Guid.NewGuid(),
                Value    = "Headquarters",
                Position = 0
            };
            var response = FacilityTypeDTO.MapFromDatabaseEntity(facilityType);

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