public void SetUp() { this.name = "c1"; this.resource = new CartonTypeUpdateResource { Description = "new desc" }; this.CartonTypeRepository.FindById(this.name) .Returns(new CartonType(this.name, 1, 1, 1)); this.result = this.Sut.Update(this.name, this.resource); }
public void SetUp() { this.requestResource = new CartonTypeUpdateResource { Description = "d1" }; var cartonType = new CartonType("c1", 1, 2, 3); this.CartonTypeService.Update("c1", Arg.Any <CartonTypeUpdateResource>()) .Returns(new SuccessResult <CartonType>(cartonType) { Data = cartonType }); this.Response = this.Browser.Put( "/products/maint/carton-types/c1", with => { with.Header("Accept", "application/json"); with.Header("Content-Type", "application/json"); with.JsonBody(this.requestResource); }).Result; }