public void MapFromDomainEntity_NullContent_ReturnNull() { //Act var response = BusinessDriverDTO.MapFromDatabaseEntity(null); //Assert Assert.IsNull(response); }
public static BusinessDriver MapFromDomainEntity(BusinessDriverDTO businessDriver) { if (businessDriver == null) { return(null); } return(new BusinessDriver() { Id = businessDriver.Id, Value = businessDriver.Value, Position = businessDriver.Position }); }
public void MapFromDomainEntity_ValidEntity_ReturnDTOEntity() { //Arrange var businessDriver = new BusinessDriverDTO() { Id = Guid.NewGuid(), Value = "Run", Position = 0 }; var response = BusinessDriver.MapFromDomainEntity(businessDriver); Assert.IsNotNull(response); Assert.AreEqual(businessDriver.Id, response.Id); Assert.AreEqual(businessDriver.Value, response.Value); Assert.AreEqual(businessDriver.Position, response.Position); }