Esempio n. 1
0
 public void SetUp()
 {
     this.detail = new SosAllocDetail {
         QuantityToAllocate = 4, Id = 606
     };
     this.updateResource = new SosAllocDetailResource {
         QuantityToAllocate = 400
     };
     this.Repository.FindById(606).Returns(this.detail);
     this.result = this.Sut.Update(606, this.updateResource);
 }
Esempio n. 2
0
        public void SetUp()
        {
            this.resource = new SosAllocDetailResource {
                QuantityToAllocate = 222
            };
            this.sosAllocDetail = new SosAllocDetail {
                Id = 11, AccountId = 1, JobId = 808, QuantityToAllocate = 222
            };

            this.SosAllocDetailFacadeService
            .Update(11, Arg.Is <SosAllocDetailResource>(a => a.QuantityToAllocate == 222))
            .Returns(new SuccessResult <SosAllocDetail>(this.sosAllocDetail));

            this.Response = this.Browser.Put(
                "/logistics/sos-alloc-details/11",
                with =>
            {
                with.Header("Accept", "application/json");
                with.JsonBody(this.resource);
            }).Result;
        }