public void SetUp() { this.resource = new VatCodeResource { Code = "A", Description = "STD UK VAT RATE.", Rate = 20 }; this.result = this.Sut.Add(this.resource); }
public void SetUp() { this.code = "A"; this.resource = new VatCodeResource { Code = "A", Description = "STD UK VAT RATE.", Rate = 20 }; this.VatCodeRepository.FindById(this.code).Returns(new VatCode("A", "desc", 3, null, 1, "N")); this.result = this.Sut.Update(this.code, this.resource); }
public void SetUp() { this.requestResource = new VatCodeResource { Code = "A" }; var vatCode = new VatCode("A", "STD UK VAT RATE.", 20, null, 1, "N"); this.VatCodeService.Add(Arg.Any <VatCodeResource>(), Arg.Any <IEnumerable <string> >()) .Returns(new CreatedResult <ResponseModel <VatCode> >(new ResponseModel <VatCode>(vatCode, new List <string>()))); this.Response = this.Browser.Post( "/products/maint/vat-codes", with => { with.Header("Accept", "application/json"); with.Header("Content-Type", "application/json"); with.JsonBody(this.requestResource); }).Result; }