Ejemplo n.º 1
0
 public void SetUp()
 {
     this.sernosTrans = new SernosTrans {
         TransCode = "t"
     };
     this.resource = new SernosTransactionResource
     {
         TransDescription  = "d",
         ManualPost        = "Y",
         SernosTransCounts = new List <SernosTransactionCountResource>
         {
             new SernosTransactionCountResource(),
             new SernosTransactionCountResource()
         }
     };
     this.SerialNumberTransactionRepository.FindById("t").Returns(this.sernosTrans);
     this.result = this.Sut.Update(this.sernosTrans.TransCode, this.resource);
 }
Ejemplo n.º 2
0
        public void SetUp()
        {
            var sernosTrans = new SernosTrans
            {
                TransCode        = "t",
                TransDescription = "d"
            };

            this.SernosTransactionService.GetById("t")
            .Returns(new SuccessResult <SernosTrans>(sernosTrans)
            {
                Data = sernosTrans
            });

            this.Response = this.Browser.Get(
                "/products/maint/serial-number-transactions/t",
                with =>
            {
                with.Header("Accept", "application/json");
            }).Result;
        }
Ejemplo n.º 3
0
        public void SetUp()
        {
            var sernosTrans1 = new SernosTrans
            {
                TransCode        = "1",
                TransDescription = "d1"
            };
            var sernosTrans2 = new SernosTrans
            {
                TransCode        = "2",
                TransDescription = "d2"
            };

            this.SernosTransactionService.GetAll()
            .Returns(new SuccessResult <IEnumerable <SernosTrans> >(new[] { sernosTrans1, sernosTrans2 }));

            this.Response = this.Browser.Get(
                "/products/maint/serial-number-transactions",
                with =>
            {
                with.Header("Accept", "application/json");
            }).Result;
        }
Ejemplo n.º 4
0
        public void SetUp()
        {
            this.requestResource = new SernosTransactionResource {
                TransDescription = "d"
            };
            var sernosTrans = new SernosTrans {
                TransCode = "t", TransDescription = "d"
            };

            this.SernosTransactionService.Update("t", Arg.Any <SernosTransactionResource>())
            .Returns(new SuccessResult <SernosTrans>(sernosTrans)
            {
                Data = sernosTrans
            });

            this.Response = this.Browser.Put(
                "/products/maint/serial-number-transactions/t",
                with =>
            {
                with.Header("Accept", "application/json");
                with.Header("Content-Type", "application/json");
                with.JsonBody(this.requestResource);
            }).Result;
        }