private void UpdateStatusTest(Guid id, Status expectedStatus, string expectedRemarks) { if (expectedStatus == Status.Active) { _riskCommands.Activate(id, expectedRemarks); } else { _riskCommands.Deactivate(id, expectedRemarks); } var newRisk = _riskQueries.GetById(id); Assert.IsNotNull(newRisk); Assert.AreEqual(expectedStatus, (Status)newRisk.Status); Assert.AreEqual(expectedRemarks, newRisk.Description); }
public ActionResult RiskLevel(Guid id) { var riskLevel = _queries.GetById(id); if (riskLevel != null) { return(this.Success(riskLevel)); } return(this.Failed("app:fraud.manager.message.invalidRiskLevelId")); }