Skip to content

Commit 0542bfd

Browse files
committed
Fixed a bug where parentTotalIncome was never getting set
1 parent 21a8f82 commit 0542bfd

File tree

2 files changed

+48
-1
lines changed

2 files changed

+48
-1
lines changed

AidEstimation.EfcCalculation.Test/EfcCalculatorTests.cs

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,53 @@ public void GetDependentEfcProfile_LowValues_Calculated()
116116
Assert.AreEqual(0, profile.ExpectedFamilyContribution);
117117
}
118118

119+
[TestMethod]
120+
public void GetDependentEfcProfile_ParentTotalIncome_Calculated()
121+
{
122+
DependentEfcCalculatorArguments args = new DependentEfcCalculatorArguments
123+
{
124+
FirstParent = new HouseholdMember
125+
{
126+
IsWorking = false,
127+
WorkIncome = 0
128+
},
129+
SecondParent = new HouseholdMember
130+
{
131+
IsWorking = false,
132+
WorkIncome = 0
133+
},
134+
Student = new HouseholdMember
135+
{
136+
IsWorking = false,
137+
WorkIncome = 0
138+
},
139+
ParentAdjustedGrossIncome = 0,
140+
AreParentsTaxFilers = false,
141+
ParentIncomeTaxPaid = 0,
142+
ParentUntaxedIncomeAndBenefits = 10000,
143+
ParentAdditionalFinancialInfo = 0,
144+
StudentAdjustedGrossIncome = 0,
145+
IsStudentTaxFiler = false,
146+
StudentIncomeTaxPaid = 0,
147+
StudentUntaxedIncomeAndBenefits = 0,
148+
StudentAdditionalFinancialInfo = 0,
149+
ParentCashSavingsChecking = 0,
150+
ParentInvestmentNetWorth = 0,
151+
ParentBusinessFarmNetWorth = 0,
152+
StudentCashSavingsChecking = 0,
153+
StudentInvestmentNetWorth = 0,
154+
MaritalStatus = MaritalStatus.MarriedRemarried,
155+
StateOfResidency = UnitedStatesStateOrTerritory.California,
156+
NumberInHousehold = 3,
157+
NumberInCollege = 1,
158+
OldestParentAge = 30,
159+
MonthsOfEnrollment = 9
160+
};
161+
162+
EfcProfile profile = _efcCalculator.GetDependentEfcProfile(args);
163+
Assert.AreEqual(10000, profile.ParentTotalIncome);
164+
}
165+
119166
[TestMethod]
120167
public void GetDependentEfcProfile_Values_Calculated()
121168
{

AidEstimation.EfcCalculation/EfcProfile.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public EfcProfile(double expectedFamilyContribution,
3434
ExpectedFamilyContribution = expectedFamilyContribution;
3535
ParentContribution = parentContribution;
3636
StudentContribution = studentContribution;
37-
ParentTotalIncome = ParentTotalIncome;
37+
ParentTotalIncome = parentTotalIncome;
3838
}
3939
}
4040
}

0 commit comments

Comments
 (0)