public void TestCreateRandomAmericanOpes() { var amer = new NorthAmerican(NAmerUtil.GetWorkingAdultBirthDate(), Gender.Female); var testSubject = new NorthAmericanWealth(amer); System.Diagnostics.Debug.WriteLine(string.Join(" ", amer.Age, amer.MaritialStatus, amer.Education, amer.Race)); testSubject.CreateRandomAmericanOpes(); Assert.IsTrue(testSubject.HomeDebt.Any()); Assert.IsTrue(testSubject.CheckingAccounts.Any()); Assert.IsTrue(testSubject.SavingAccounts.Any()); System.Diagnostics.Debug.WriteLine(testSubject.FinancialData.ToString()); }
/// <summary> /// Instantiates new <see cref="NorthAmericanWealth"/> for this instance /// and assigns a ref likewise to current <see cref="Spouse"/> /// </summary> protected internal void ResolveFinancialState() { _opes = new NorthAmericanWealth(this); _opes.CreateRandomAmericanOpes(); var sp = Spouse?.Est as NorthAmerican; if (sp == null) return; sp._opes = _opes; foreach (var ca in _opes.CheckingAccounts) ca.IsJointAcct = true; }