public void SetUp() { this.sernosTrans = new SernosTrans { TransCode = "t" }; this.resource = new SernosTransactionResource { TransDescription = "d", ManualPost = "Y", SernosTransCounts = new List <SernosTransactionCountResource> { new SernosTransactionCountResource(), new SernosTransactionCountResource() } }; this.SerialNumberTransactionRepository.FindById("t").Returns(this.sernosTrans); this.result = this.Sut.Update(this.sernosTrans.TransCode, this.resource); }
public void SetUp() { this.requestResource = new SernosTransactionResource { TransDescription = "d" }; var sernosTrans = new SernosTrans { TransCode = "t", TransDescription = "d" }; this.SernosTransactionService.Update("t", Arg.Any <SernosTransactionResource>()) .Returns(new SuccessResult <SernosTrans>(sernosTrans) { Data = sernosTrans }); this.Response = this.Browser.Put( "/products/maint/serial-number-transactions/t", with => { with.Header("Accept", "application/json"); with.Header("Content-Type", "application/json"); with.JsonBody(this.requestResource); }).Result; }