public void SetUp() { this.requestResource = new TypeOfSaleResource { Description = "new desc", Department = "new dept", Nominal = "new nom", RealSale = "N" }; var typeOfSale = new TypeOfSale("name", "desc", "nom", "dept", "Y") { Description = "new desc" }; this.TypeOfSaleService.Update("name", Arg.Any <TypeOfSaleResource>()).Returns(new SuccessResult <TypeOfSale>(typeOfSale) { Data = typeOfSale }); this.Response = this.Browser.Put( "/products/maint/types-of-sale/name", with => { with.Header("Accept", "application/json"); with.Header("Content-Type", "application/json"); with.JsonBody(this.requestResource); }).Result; }
public void SetUp() { var typeOfSale1 = new TypeOfSale("name1", "desc", "nom", "dept", "Y"); var typeOfSale2 = new TypeOfSale("name2", "desc", "nom", "dept", "Y"); this.TypeOfSaleService.GetAll().Returns( new SuccessResult <IEnumerable <TypeOfSale> >(new List <TypeOfSale> { typeOfSale1, typeOfSale2 })); this.Response = this.Browser.Get( "/products/maint/types-of-sale", with => { with.Header("Accept", "application/json"); }).Result; }
public void SetUp() { var typeOfSale = new TypeOfSale("name", "desc", "nom", "dept", "Y"); this.TypeOfSaleService.GetById("name") .Returns(new SuccessResult <TypeOfSale>(typeOfSale) { Data = typeOfSale }); this.Response = this.Browser.Get( "/products/maint/types-of-sale/name", with => { with.Header("Accept", "application/json"); }).Result; }
public void SetUp() { this.requestResource = new TypeOfSaleResource { Name = "sale" }; var typeOfSale = new TypeOfSale("name", "desc", "nom", "dept", "Y"); this.TypeOfSaleService.Add(Arg.Any <TypeOfSaleResource>()) .Returns(new CreatedResult <TypeOfSale>(typeOfSale) { Data = typeOfSale }); this.Response = this.Browser.Post( "/products/maint/types-of-sale", with => { with.Header("Accept", "application/json"); with.Header("Content-Type", "application/json"); with.JsonBody(this.requestResource); }).Result; }
public PriceItineraryRequest setPriceItineraryRequest(int numadt, int numchd, String faretype, String currency, GetAvailabilityResponse response, string sourceorg, string agentcode, int overnight) { PriceItineraryRequest priceitinrequest = new PriceItineraryRequest(); priceitinrequest.Signature = signature; ItineraryPriceRequest itinerarypricerequest = new ItineraryPriceRequest(); priceitinrequest.ItineraryPriceRequest = itinerarypricerequest; itinerarypricerequest.PriceItineraryBy = PriceItineraryBy.JourneyBySellKey;//get price itinerary by using JourneyWithSellKey TypeOfSale typeofsale = new TypeOfSale(); itinerarypricerequest.TypeOfSale = typeofsale; typeofsale.FareTypes = new string[1];// refers to RE or ST or JP wholesaler fares;-faretypes are governed by type of sale typeofsale.FareTypes[0] = faretype;// pass this back to the faretype parameter PriceJourneyRequestData pricerequest = new PriceJourneyRequestData(); SellJourneyByKeyRequestData sellkeyrequest = new SellJourneyByKeyRequestData(); itinerarypricerequest.SellByKeyRequest = sellkeyrequest; pricerequest.CurrencyCode = currency; pricerequest.PriceJourneys = new PriceJourney[1]; pricerequest.PriceJourneys[0] = new PriceJourney(); pricerequest.PaxCount = (short)(numadt + numchd); return null; }
public void SetUpContext() { this.Sut = new TypeOfSale("DL", "SALES OF LINN RECORDS DOWNLOADS", "DUMMY", "DUMMY", "Y"); }