Example #1
0
 public void SetUp()
 {
     this.productRange = new ProductRange {
         Id = 111
     };
     this.resource = new ProductRangeUpdateResource
     {
         RangeName        = "new name",
         RangeDescription = "new description",
         DateInvalid      = 1.December(2021).ToString("o")
     };
     this.ProductRangeRepository.FindById(111).Returns(this.productRange);
     this.result = this.Sut.Update(111, this.resource);
 }
        public void SetUp()
        {
            this.productRange = new ProductRange {
                Id = 3, RangeName = "name"
            };
            this.resource = new ProductRangeUpdateResource
            {
                RangeName = "name"
            };
            this.ProductRangeService.Update(3, Arg.Any <ProductRangeUpdateResource>())
            .Returns(new SuccessResult <ProductRange>(this.productRange));

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