public ActionResult ModifyCurrencyWithdrawVerifyLine(int currencyID, decimal verifyLine) { var cmd = new ModifyCurrencyWithdrawVerifyLine(currencyID, verifyLine, this.CurrentUser.UserID); this.CommandBus.Send(cmd); return Json(JsonResult.Success); }
public void TestModifyCurrencyWithdrawVerifyLine() { var userID = new Random().Next(1, 10); var currency = GetOneCurrency(); var verifyLine = 50000; var cmd = new ModifyCurrencyWithdrawVerifyLine(currency.ID, verifyLine, userID); Assert.DoesNotThrow(() => { this.commandBus.Send(cmd); }); var savedCurrency = IoC.Resolve<IRepository>().FindById<Currency>(currency.ID); Assert.Equal(savedCurrency.WithdrawVerifyLine, verifyLine); }