public void Validation_ValidSelfReportedLoanNullLists() { SelfReportedLoanListModel srlList = new SelfReportedLoanListModel(); srlList.Loans = null; bool bValid = srlList.IsValid(); Assert.IsTrue(bValid, "This SelfReportedLoanList failed validation when it has a null Loan list."); }
public void Validation_ValidSelfReportedLoanListModel() { SelfReportedLoanModel srl = GetValidSelfReportedLoanData(); SelfReportedLoanListModel srlList = new SelfReportedLoanListModel(); srlList.Loans.Add(srl); bool bValid = srlList.IsValid(); Assert.IsTrue(bValid, "A SelfReportedLoanListModel with all good information validated incorrectly."); }
public static bool ValidateInputSelfReportedLoanList(SelfReportedLoanListModel sr) { bool bValid = false; if (sr != null) { bValid = sr.IsValid(); if (sr.Loans != null) { foreach (SelfReportedLoanModel srl in sr.Loans) { bValid &= ValidateInputSelfReportedLoan(srl); if (!bValid) { break; } } } } return(bValid); }