public void SetUp() { this.searchRequestResource = new JobIdRequestResource { JobId = 808 }; this.sosAllocDetail1 = new SosAllocDetail { Id = 1, AccountId = 1, JobId = 808 }; this.sosAllocDetail2 = new SosAllocDetail { Id = 2, AccountId = 2, JobId = 808 }; this.SosAllocDetailFacadeService .FilterBy(Arg.Is <JobIdRequestResource>(a => a.JobId == this.searchRequestResource.JobId)) .Returns(new SuccessResult <IEnumerable <SosAllocDetail> >(new List <SosAllocDetail> { this.sosAllocDetail1, this.sosAllocDetail2 })); this.Response = this.Browser.Get( "/logistics/sos-alloc-details", with => { with.Header("Accept", "application/json"); with.JsonBody(this.searchRequestResource); }).Result; }
public void SetUp() { this.jobId = 283476; this.allocationResult = new AllocationResult(this.jobId); this.resource = new JobIdRequestResource { JobId = this.jobId }; this.AllocationFacadeService.FinishAllocation(this.jobId) .Returns(new SuccessResult <AllocationResult>(this.allocationResult)); this.Response = this.Browser.Post( $"/logistics/allocations/finish", with => { with.Header("Accept", "application/json"); with.Header("Content-Type", "application/json"); with.JsonBody(this.resource); }).Result; }