public void SetUp()
        {
            this.resource = new ProductRangeResource
            {
                RangeName = "new name"
            };

            this.result = this.Sut.Add(this.resource);
        }
Пример #2
0
        public void SetUp()
        {
            this.resource = new ProductRangeResource
            {
                RangeName        = "new name",
                RangeDescription = "new description"
            };

            this.result = this.Sut.Add(this.resource);
        }
Пример #3
0
        public void SetUp()
        {
            this.productRange = new ProductRange {
                Id = 3, RangeName = "name", RangeDescription = "desc"
            };
            this.resource = new ProductRangeResource
            {
                RangeName        = "name",
                RangeDescription = "desc"
            };
            this.ProductRangeService.Add(Arg.Any <ProductRangeResource>())
            .Returns(new CreatedResult <ProductRange>(this.productRange));

            this.Response = this.Browser.Post(
                "/products/maint/product-ranges",
                with =>
            {
                with.Header("Accept", "application/json");
                with.Header("Content-Type", "application/json");
                with.JsonBody(this.resource);
            }).Result;
        }