public void MapFromDomainEntity_NullContent_ReturnNull() { //Act var response = WorkPackagesLevel1DTO.MapFromDatabaseEntity(null); //Assert Assert.IsNull(response); }
public void MapFromDomainEntity_ValidEntity_ReturnDTOEntity() { //Arrange var workPackagesLevel1 = new WorkPackagesLevel1() { Id = Guid.NewGuid(), Value = "Design Consultants", Position = 0 }; var response = WorkPackagesLevel1DTO.MapFromDatabaseEntity(workPackagesLevel1); Assert.IsNotNull(response); Assert.AreEqual(workPackagesLevel1.Id, response.Id); Assert.AreEqual(workPackagesLevel1.Value, response.Value); Assert.AreEqual(workPackagesLevel1.Position, response.Position); }