public void SetUp() { this.searchRequestResource = new SearchRequestResource { SearchTerm = "222" }; this.sosAllocHead1 = new SosAllocHead { AccountId = 1, JobId = 222, SalesOutlet = new SalesOutlet(1, 1) }; this.sosAllocHead2 = new SosAllocHead { AccountId = 2, JobId = 222, SalesOutlet = new SalesOutlet(2, 2) }; this.SosAllocHeadFacadeService.GetAllocHeads(222) .Returns(new SuccessResult <IEnumerable <SosAllocHead> >(new List <SosAllocHead> { this.sosAllocHead1, this.sosAllocHead2 })); this.Response = this.Browser.Get( "/logistics/sos-alloc-heads", with => { with.Header("Accept", "application/json"); with.JsonBody(this.searchRequestResource); }).Result; }
public void SetUp() { this.partNumber = "abc"; this.request = new SearchRequestResource { ExactOnly = true, SearchTerm = this.partNumber }; var p = new Part { Id = 1, PartNumber = this.partNumber, StockControlled = "Y", CreatedBy = new Employee { Id = 1 } }; this.PartsFacadeService.GetPartByPartNumber(this.partNumber).Returns(new SuccessResult <IEnumerable <Part> >(new List <Part> { p })); this.Response = this.Browser.Get( "/parts", with => { with.Header("Accept", "application/json"); with.JsonBody(this.request); }).Result; }