public void TestGetPaycheck() { 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)); var testResult = testSubject.GetYearlyIncome(null,1.0); System.Diagnostics.Debug.WriteLine(testResult); Assert.IsNotNull(testResult); Assert.IsTrue(testResult.Amount > 0.0M); }
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()); }
public void TestGetRandomCcDebt() { var amer = new NorthAmerican(NAmerUtil.GetWorkingAdultBirthDate(), Gender.Female); var testSubject = new NorthAmericanWealth(amer); testSubject.AddSingleCcDebt(); Assert.IsTrue(testSubject.CreditCardDebt.Any()); var testResult = testSubject.CreditCardDebt.First() as CreditCardAccount; Assert.IsNotNull(testResult); System.Diagnostics.Debug.WriteLine(testResult.Cc.CardHolderSince); System.Diagnostics.Debug.WriteLine(testResult.Max); System.Diagnostics.Debug.WriteLine(testResult.TradeLine.Balance.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; }
public override Opes GetWealthAt(DateTime? dt) { return _opes ?? (_opes = new NorthAmericanWealth(this)); }
public void TestGetRandomHomeLoan() { var amer = new NorthAmerican(NAmerUtil.GetWorkingAdultBirthDate(), Gender.Female); var testSubject = new NorthAmericanWealth(amer); testSubject.AddMortgage(); var homeLoan = testSubject.HomeDebt.FirstOrDefault() as FixedRateLoan; Assert.IsNotNull(homeLoan); System.Diagnostics.Debug.WriteLine(homeLoan.TradeLine.Balance.ToString()); }
public void TestGetRandomVehicle() { 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)); var testResult = testSubject.AddVehicleLoan(); Assert.IsNotNull(testResult); if (testSubject.VehicleDebt.Any()) { var testResultSfrl = testSubject.VehicleDebt.First() as NoFuture.Rand.Data.Sp.SecuredFixedRateLoan; Assert.IsNotNull(testResultSfrl); System.Diagnostics.Debug.WriteLine(testResultSfrl.Description); Assert.IsNotNull( testResultSfrl.PropertyId); } }
public void TestGetRandomRent() { var amer = new NorthAmerican(NAmerUtil.GetWorkingAdultBirthDate(), Gender.Female); var testSubject = new NorthAmericanWealth(amer, true); testSubject.AddRent(); var rent = testSubject.HomeDebt.FirstOrDefault() as Rent; Assert.IsNotNull(rent); System.Diagnostics.Debug.WriteLine(rent.TradeLine.Balance.ToString()); }