public void Validation_ValidSelfReportedLoanModel() { SelfReportedLoanModel srl = GetValidSelfReportedLoanData(); bool bValid = srl.IsValid(); Assert.IsTrue(bValid, "A SelfReportedLoanModel with all good information validated incorrectly."); }
public static bool ValidateInputSelfReportedLoan(SelfReportedLoanModel sr) { bool bValid = false; if (sr != null) { bValid = sr.IsValid(); } return(bValid); }
public SelfReportedLoanModel CreateLoan(SelfReportedLoanModel loan) { if (!loan.IsValid()) { throw new System.ComponentModel.DataAnnotations.ValidationException(); } var loanContract = loan.ToMemberReportedLoanContract(); var userId = _memberAdapter.GetMemberIdFromContext(); var serviceResponse = SaltServiceAgent.CreateLoan(userId, loanContract).FromMemberReportedLoanContract(); return(serviceResponse); }
public static bool ValidateSelfReportedLoanId(string id) { bool bValid = false; SelfReportedLoanModel srl = new SelfReportedLoanModel(); srl.LoanSelfReportedEntryId = id; if (id != null && srl.IsValid("ID")) { bValid = true; } return(bValid); }