public virtual ApiSalesPersonQuotaHistoryResponseModel MapBOToModel(
            BOSalesPersonQuotaHistory boSalesPersonQuotaHistory)
        {
            var model = new ApiSalesPersonQuotaHistoryResponseModel();

            model.SetProperties(boSalesPersonQuotaHistory.BusinessEntityID, boSalesPersonQuotaHistory.ModifiedDate, boSalesPersonQuotaHistory.QuotaDate, boSalesPersonQuotaHistory.Rowguid, boSalesPersonQuotaHistory.SalesQuota);

            return(model);
        }
Exemplo n.º 2
0
        public void MapResponseToRequest()
        {
            var mapper = new ApiSalesPersonQuotaHistoryModelMapper();
            var model  = new ApiSalesPersonQuotaHistoryResponseModel();

            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"), 1m);
            ApiSalesPersonQuotaHistoryRequestModel response = mapper.MapResponseToRequest(model);

            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.QuotaDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.Rowguid.Should().Be(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
            response.SalesQuota.Should().Be(1m);
        }