public virtual ApiSaleResponseModel MapBOToModel( BOSale boSale) { var model = new ApiSaleResponseModel(); model.SetProperties(boSale.Id, boSale.Amount, boSale.ClientId, boSale.Note, boSale.PetId, boSale.SaleDate, boSale.SalesPersonId); return(model); }
public virtual ApiSaleResponseModel MapBOToModel( BOSale boSale) { var model = new ApiSaleResponseModel(); model.SetProperties(boSale.Id, boSale.Amount, boSale.FirstName, boSale.LastName, boSale.PaymentTypeId, boSale.PetId, boSale.Phone); return(model); }
public virtual ApiSaleResponseModel MapBOToModel( BOSale boSale) { var model = new ApiSaleResponseModel(); model.SetProperties(boSale.Id, boSale.IpAddress, boSale.Note, boSale.SaleDate, boSale.TransactionId); return(model); }
public void MapResponseToRequest() { var mapper = new ApiSaleModelMapper(); var model = new ApiSaleResponseModel(); model.SetProperties(1, "A", "A", DateTime.Parse("1/1/1987 12:00:00 AM"), 1); ApiSaleRequestModel response = mapper.MapResponseToRequest(model); response.IpAddress.Should().Be("A"); response.Note.Should().Be("A"); response.SaleDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.TransactionId.Should().Be(1); }
public void MapResponseToRequest() { var mapper = new ApiSaleModelMapper(); var model = new ApiSaleResponseModel(); model.SetProperties(1, 1m, 1, "A", 1, DateTime.Parse("1/1/1987 12:00:00 AM"), 1); ApiSaleRequestModel response = mapper.MapResponseToRequest(model); response.Amount.Should().Be(1m); response.ClientId.Should().Be(1); response.Note.Should().Be("A"); response.PetId.Should().Be(1); response.SaleDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.SalesPersonId.Should().Be(1); }
public void MapResponseToRequest() { var mapper = new ApiSaleModelMapper(); var model = new ApiSaleResponseModel(); model.SetProperties(1, 1m, "A", "A", 1, 1, "A"); ApiSaleRequestModel response = mapper.MapResponseToRequest(model); response.Amount.Should().Be(1m); response.FirstName.Should().Be("A"); response.LastName.Should().Be("A"); response.PaymentTypeId.Should().Be(1); response.PetId.Should().Be(1); response.Phone.Should().Be("A"); }