Skip to content

Commit 8d9d09c

Browse files
committed
fix tests
1 parent 9a96757 commit 8d9d09c

17 files changed

Lines changed: 18 additions & 18 deletions

common/src/test/scala/hmda/parser/filing/ParserFlowSpec.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class ParserFlowSpec extends WordSpec with MustMatchers {
6262
.map(ByteString(_))
6363
.via(parseTsFlow)
6464
.map(_._1)
65-
.map(_.swap.getOrElse)
65+
.map(_.left.get)
6666
.runWith(TestSink.probe[List[ParserValidationError]])
6767
.request(1)
6868
.expectNext(List(IncorrectNumberOfFieldsTs("18")))
@@ -84,7 +84,7 @@ class ParserFlowSpec extends WordSpec with MustMatchers {
8484
.map(ByteString(_))
8585
.via(parseLarFlow)
8686
.map(_._1)
87-
.map(_.swap.getOrElse)
87+
.map(_.left.get)
8888
.runWith(TestSink.probe[List[ParserValidationError]])
8989
.request(badLarList.size)
9090
.expectNextN(

hmda/src/test/scala/hmda/validation/engine/2018/LarEngine2018Spec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ class LarEngine2018Spec extends WordSpec with ScalaCheckPropertyChecks with Must
126126
val validation =
127127
checkAll(lar, lar.larIdentifier.LEI, testContext, TsValidationError)
128128
val errors =
129-
validation.leftMap(errors => errors.toList).toEither.swap.getOrElse
129+
validation.leftMap(errors => errors.toList).toEither.left.get
130130
errors must not be empty
131131
}
132132
}

hmda/src/test/scala/hmda/validation/engine/2018/TsEngine2018Spec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class TsEngine2018Spec extends PropSpec with ScalaCheckPropertyChecks with MustM
3939
val validation =
4040
checkAll(ts.copy(id = 2, quarter = 2), ts.LEI, testContext, TsValidationError)
4141
val errors =
42-
validation.leftMap(errors => errors.toList).toEither.swap.getOrElse
42+
validation.leftMap(errors => errors.toList).toEither.left.get
4343
errors mustBe
4444
List(SyntacticalValidationError(ts.LEI, "S300", TsValidationError), ValidityValidationError(ts.LEI, "V602", TsValidationError))
4545
}

hmda/src/test/scala/hmda/validation/engine/2019/LarEngine2019Spec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ class LarEngine2019Spec extends WordSpec with ScalaCheckPropertyChecks with Must
126126
val validation =
127127
checkAll(lar, lar.larIdentifier.LEI, testContext, TsValidationError)
128128
val errors =
129-
validation.leftMap(errors => errors.toList).toEither.swap.getOrElse
129+
validation.leftMap(errors => errors.toList).toEither.left.get
130130
errors must not be empty
131131
}
132132
}

hmda/src/test/scala/hmda/validation/engine/2019/TSEngine2019Spec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class TsEngine2019Spec extends PropSpec with ScalaCheckPropertyChecks with MustM
3939
val validation =
4040
checkAll(ts.copy(id = 2, quarter = 2), ts.LEI, testContext, TsValidationError)
4141
val errors =
42-
validation.leftMap(errors => errors.toList).toEither.swap.getOrElse
42+
validation.leftMap(errors => errors.toList).toEither.left.get
4343
errors mustBe
4444
List(SyntacticalValidationError(ts.LEI, "S300", TsValidationError), ValidityValidationError(ts.LEI, "V602", TsValidationError))
4545
}

hmda/src/test/scala/hmda/validation/engine/2020/LarEngine2020QSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ class LarEngine2020QSpec extends WordSpec with ScalaCheckPropertyChecks with Mus
130130
val validation =
131131
checkAll(lar, lar.larIdentifier.LEI, testContext, TsValidationError)
132132
val errors =
133-
validation.leftMap(errors => errors.toList).toEither.swap.getOrElse
133+
validation.leftMap(errors => errors.toList).toEither.left.get
134134
errors must not be empty
135135
}
136136
}

hmda/src/test/scala/hmda/validation/engine/2020/LarEngine2020Spec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ class LarEngine2020Spec extends WordSpec with ScalaCheckPropertyChecks with Must
130130
val validation =
131131
checkAll(lar, lar.larIdentifier.LEI, testContext, TsValidationError)
132132
val errors =
133-
validation.leftMap(errors => errors.toList).toEither.swap.getOrElse
133+
validation.leftMap(errors => errors.toList).toEither.left.get
134134
errors must not be empty
135135
}
136136
}

hmda/src/test/scala/hmda/validation/engine/2020/TSEngine2020SQpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class TsEngine2020SQpec extends PropSpec with ScalaCheckPropertyChecks with Must
4242
) {
4343
val testContext = ValidationContext(None, Some(Period(ts.year, None)))
4444
val validation = checkAll(ts.copy(id = 2, quarter = 2), ts.LEI, testContext, TsValidationError)
45-
val errors = validation.leftMap(errors => errors.toList).toEither.swap.getOrElse
45+
val errors = validation.leftMap(errors => errors.toList).toEither.left.get
4646
errors mustBe List(
4747
SyntacticalValidationError(ts.LEI, "S300", TsValidationError),
4848
ValidityValidationError(ts.LEI, "V718", TsValidationError)

hmda/src/test/scala/hmda/validation/engine/2020/TSEngine2020Spec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class TsEngine2020Spec extends PropSpec with ScalaCheckPropertyChecks with MustM
3838
) {
3939
val testContext = ValidationContext(None, Some(Period(ts.year, None)))
4040
val validation = checkAll(ts.copy(id = 2, quarter = 2), ts.LEI, testContext, TsValidationError)
41-
val errors = validation.leftMap(errors => errors.toList).toEither.swap.getOrElse
41+
val errors = validation.leftMap(errors => errors.toList).toEither.left.get
4242
errors mustBe
4343
List(SyntacticalValidationError(ts.LEI, "S300", TsValidationError), ValidityValidationError(ts.LEI, "V602", TsValidationError))
4444

hmda/src/test/scala/hmda/validation/engine/2021/LarEngine2021QSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ class LarEngine2021QSpec extends WordSpec with ScalaCheckPropertyChecks with Mus
130130
val validation =
131131
checkAll(lar, lar.larIdentifier.LEI, testContext, TsValidationError)
132132
val errors =
133-
validation.leftMap(errors => errors.toList).toEither.swap.getOrElse
133+
validation.leftMap(errors => errors.toList).toEither.left.get
134134
errors must not be empty
135135
}
136136
}

0 commit comments

Comments
 (0)