public void TestGetFactor() { var testResult = AmericanFactors.GetFactor(AmericanFactorTables.HomeDebt, (OccidentalEdu.Bachelor | OccidentalEdu.Grad), NorthAmericanRace.Asian, AmericanRegion.West, 38, Gender.Male, MaritalStatus.Single); Assert.AreNotEqual(0.0D, testResult); System.Diagnostics.Debug.WriteLine(testResult); }
public void TestGetFactor() { var testFactor = AmericanFactorTables.HomeEquity; var edu = OccidentalEdu.Grad | OccidentalEdu.Bachelor; //1.16049 var race = NorthAmericanRace.Hispanic; //0.617280 var region = AmericanRegion.Midwest; //0.76515 var maritalStatus = MaritalStatus.Married; var age = 52; //0.86420 var testResult = AmericanFactors.GetFactor(testFactor, edu, race, region, age, Gender.Male, maritalStatus); var expectedResult = Math.Round((1.16049D + 0.61728D + 0.76515D + 0.8642D) / 4, 5); Assert.AreEqual(expectedResult, testResult); System.Diagnostics.Debug.WriteLine(testResult); }