public virtual ApiSalesTerritoryHistoryResponseModel MapBOToModel( BOSalesTerritoryHistory boSalesTerritoryHistory) { var model = new ApiSalesTerritoryHistoryResponseModel(); model.SetProperties(boSalesTerritoryHistory.BusinessEntityID, boSalesTerritoryHistory.EndDate, boSalesTerritoryHistory.ModifiedDate, boSalesTerritoryHistory.Rowguid, boSalesTerritoryHistory.StartDate, boSalesTerritoryHistory.TerritoryID); return(model); }
public void MapResponseToRequest() { var mapper = new ApiSalesTerritoryHistoryModelMapper(); var model = new ApiSalesTerritoryHistoryResponseModel(); model.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), DateTime.Parse("1/1/1987 12:00:00 AM"), Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"), DateTime.Parse("1/1/1987 12:00:00 AM"), 1); ApiSalesTerritoryHistoryRequestModel response = mapper.MapResponseToRequest(model); response.EndDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.Rowguid.Should().Be(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da")); response.StartDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.TerritoryID.Should().Be(1); }