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;
        }
Пример #2
0
        public void SetUp()
        {
            this.sosAllocHead1 = new SosAllocHead {
                AccountId = 1, JobId = 222, SalesOutlet = new SalesOutlet(1, 2)
            };
            this.sosAllocHead2 = new SosAllocHead {
                AccountId = 2, JobId = 222, SalesOutlet = new SalesOutlet(2, 4)
            };

            this.SosAllocHeadFacadeService.GetAllAllocHeads()
            .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");
            }).Result;
        }