@@ -172,22 +172,19 @@ class RaceUtilSpec extends AsyncWordSpec with MustMatchers with LarGenerators wi
172
172
val multiMinorityLars = filterRace(source(lars), TwoOrMoreMinority )
173
173
count(multiMinorityLars).map(_ mustBe 100 )
174
174
}
175
- /* "exclude lars where applicant does not meet criteria" in {
176
- // TODO: Confirm with BAs--can any of the races be 5?
177
- val excludedLars = larCollectionWithApplicant(_.copy(race1 = 2, race2 = "5"))
175
+ " exclude lars where applicant does not meet criteria" in {
176
+ val excludedLars = larCollectionWithApplicant(_.copy(race2 = " " , race3 = " " , race4 = " " , race5 = " " ))
178
177
val otherLars = filterRace(source(excludedLars), TwoOrMoreMinority )
179
178
count(otherLars).map(_ mustBe 0 )
180
- }*/
179
+ }
181
180
" exclude lars where coApplicant does not meet criteria" in {
182
181
val excludedLars = larCollectionWithApplicant(_.copy(race1 = 1 , race2 = " 2" , coRace1 = 5 ))
183
182
val otherLars = filterRace(source(excludedLars), TwoOrMoreMinority )
184
183
count(otherLars).map(_ mustBe 0 )
185
184
}
186
185
}
187
186
188
- /*
189
187
" 'Joint' race filter" must {
190
- // TODO: Confirm with BAs--how to define "minority" here?
191
188
def minority = Gen .oneOf(1 , 2 , 3 , 4 ).sample.get
192
189
193
190
" include applications with white applicant and minority coApplicant" in {
@@ -205,13 +202,15 @@ class RaceUtilSpec extends AsyncWordSpec with MustMatchers with LarGenerators wi
205
202
count(jointLars).map(_ mustBe 100 )
206
203
}
207
204
" exclude lars with two white applicants" in {
208
- val excludedLars = larCollectionWithApplicant(_.copy(race1 = 5, coRace1 = 5))
205
+ val excludedLars = larCollectionWithApplicant(_.copy(race1 = 5 , coRace1 = 5 , race2 = " " , coRace2 = " " ,
206
+ race3 = " " , coRace3 = " " , race4 = " " , coRace4 = " " , race5 = " " , coRace5 = " " ))
209
207
val nonJointLars = filterRace(source(excludedLars), Joint )
210
208
count(nonJointLars).map(_ mustBe 0 )
211
209
}
212
210
" exclude lars with two minority applicants" in {
213
211
val excludedLars = larCollectionWithApplicant { app =>
214
- app.copy(race1 = minority, coRace1 = minority)
212
+ app.copy(race1 = minority, coRace1 = minority, race2 = " " , race3 = " " , race4 = " " ,
213
+ race5 = " " , coRace2 = " " , coRace3 = " " , coRace4 = " " , coRace5 = " " )
215
214
}
216
215
val nonJointLars = filterRace(source(excludedLars), Joint )
217
216
count(nonJointLars).map(_ mustBe 0 )
@@ -226,7 +225,6 @@ class RaceUtilSpec extends AsyncWordSpec with MustMatchers with LarGenerators wi
226
225
227
226
}
228
227
}
229
- */
230
228
231
229
" raceBorrowerCharacteristic" must {
232
230
" generate a RaceBorrowerCharacteristic with all 4 ethnicity categories and the specified dispositions" in {
0 commit comments