Example #1
0
        public void SetUp()
        {
            this.resource = new WandItemRequestResource
            {
                ConsignmentId = 1, WandString = "wa", WandAction = "W", UserNumber = 234, PrintLabels = "N"
            };
            this.wandServiceResult = new WandResult {
                Message = "ok", Success = true
            };
            this.WandService.Wand(
                this.resource.WandAction,
                this.resource.WandString,
                this.resource.ConsignmentId,
                this.resource.UserNumber,
                false)
            .Returns(this.wandServiceResult);

            this.result = this.Sut.WandItem(this.resource);
        }
Example #2
0
        public void SetUp()
        {
            this.resource = new WandItemRequestResource {
                ConsignmentId = 1, WandString = "ws"
            };
            this.result = new WandResult {
                Message = "ok", Success = true
            };
            this.WandFacadeService.WandItem(
                Arg.Is <WandItemRequestResource>(
                    a => a.ConsignmentId == this.resource.ConsignmentId &&
                    a.WandString == this.resource.WandString))
            .Returns(new SuccessResult <WandResult>(this.result));

            this.Response = this.Browser.Post(
                $"/logistics/wand/items",
                with =>
            {
                with.Header("Accept", "application/json");
                with.JsonBody(this.resource);
            }).Result;
        }