예제 #1
0
        public void SetUp()
        {
            this.resource = new ExportReturnResource
            {
                ReturnId            = 123,
                ExportReturnDetails = new List <ExportReturnDetailResource>
                {
                    new ExportReturnDetailResource {
                        RsnNumber = 123
                    }
                }
            };

            this.ExportReturnRepository.FindById(22).Returns(new ExportReturn {
                ReturnId = 22
            });

            this.ExportReturnDetailRepository.FindById(Arg.Any <ExportReturnDetailKey>())
            .Returns(new ExportReturnDetail {
                RsnNumber = 123
            });

            this.ExportReturnsPack.MakeIntercompanyInvoices(123).Returns("ok");

            this.ExportReturnRepository.FindById(123).Returns(new ExportReturn {
                ReturnId = 123
            });

            this.result = this.Sut.MakeIntercompanyInvoices(this.resource);
        }
        public void SetUp()
        {
            this.resource = new ExportReturnResource
                                {
                                    ReturnId = 123
                                };

            this.ExportReturnsPack.MakeIntercompanyInvoices(123).Returns("not ok");

            this.ExportReturnRepository.FindById(123).Returns(new ExportReturn { ReturnId = 123 });

            this.result = this.Sut.MakeIntercompanyInvoices(this.resource);
        }
예제 #3
0
        public void SetUp()
        {
            var requestResource = new ExportReturnResource {
                ReturnId = 123
            };

            this.ExportReturnService.MakeIntercompanyInvoices(Arg.Any <ExportReturnResource>())
            .Returns(new SuccessResult <ExportReturn>(new ExportReturn {
                ReturnId = 123
            }));

            this.Response = this.Browser.Post(
                "/inventory/exports/returns/make-intercompany-invoices",
                with =>
            {
                with.Header("Accept", "application/json");
                with.Header("Content-Type", "application/json");
                with.JsonBody(requestResource);
            }).Result;
        }
예제 #4
0
        public void SetUp()
        {
            this.requestResource = new ExportReturnResource {
                ReturnId = 123
            };

            this.ExportReturnService.UpdateExportReturn(123, Arg.Is <ExportReturnResource>(e => e.ReturnId == 123))
            .Returns(new SuccessResult <ExportReturn>(new ExportReturn {
                ReturnId = 123
            }));

            this.Response = this.Browser.Put(
                "/inventory/exports/returns/123",
                with =>
            {
                with.Header("Accept", "application/json");
                with.Header("Content-Type", "application/json");
                with.JsonBody(this.requestResource);
            }).Result;
        }
예제 #5
0
        public void SetUp()
        {
            var resource = new ExportReturnResource
            {
                ReturnId            = 22,
                ExportReturnDetails = new List <ExportReturnDetailResource>
                {
                    new ExportReturnDetailResource {
                        RsnNumber = 123
                    }
                }
            };

            this.ExportReturnRepository.FindById(22).Returns(new ExportReturn {
                ReturnId = 22
            });

            this.ExportReturnDetailRepository.FindById(Arg.Any <ExportReturnDetailKey>())
            .Returns(new ExportReturnDetail {
                RsnNumber = 123
            });

            this.result = this.Sut.UpdateExportReturn(22, resource);
        }