public void SetUp()
        {
            this.PartsRepository.FindBy(Arg.Any <Expression <Func <Part, bool> > >()).Returns(new Part
            {
                QcInformation = "I have some information"
            });

            this.GoodsInPack.When(x => x.GetPurchaseOrderDetails(
                                      Arg.Any <int>(),
                                      Arg.Any <int>(),
                                      out Arg.Any <string>(),
                                      out Arg.Any <string>(),
                                      out Arg.Any <string>(),
                                      out Arg.Any <int>(),
                                      out Arg.Any <string>(),
                                      out Arg.Any <string>(),
                                      out Arg.Any <string>(),
                                      out Arg.Any <string>()))
            .Do(x => x[2] = "PART");

            this.GoodsInPack.When(x => x.PartHasStorageType(
                                      "PART",
                                      out Arg.Any <int>(),
                                      out Arg.Any <string>(),
                                      out Arg.Any <bool>()))
            .Do(x => x[2] = "kardex value returned by goods in pack");

            this.GoodsInPack.PartHasStorageType("PART", out Arg.Any <int>(), out Arg.Any <string>(), out Arg.Any <bool>())
            .Returns(true);

            this.result = this.Sut.ValidatePurchaseOrder(100, 1);
        }
Example #2
0
        public void SetUp()
        {
            this.result = new ValidatePurchaseOrderResult
            {
                BookInMessage = "Validated!"
            };
            this.Service.ValidatePurchaseOrder(Arg.Any <int>(), Arg.Any <int>()).Returns(
                new SuccessResult <ValidatePurchaseOrderResult>(this.result));

            this.Response = this.Browser.Get(
                $"/logistics/purchase-orders/validate/1",
                with =>
            {
                with.Header("Accept", "application/json");
            }).Result;
        }