Skip to content

Commit

Permalink
fix labels and scalafmt
Browse files Browse the repository at this point in the history
  • Loading branch information
googley42 committed Sep 21, 2024
1 parent dab1ddc commit 93e8222
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ object TypeSafeApiNarrowSpec extends DynamoDBLocalSpec {
}

override def spec: Spec[Environment with TestEnvironment with Scope, Any] =
suite("TypeSafeApiMappingSpec")(
topLevelSumTypeDiscriminatorNameSuite
suite("TypeSafeApiNarrowSpec")(
topLevelSumTypeNarrowSuite
) @@ TestAspect.nondeterministic

val topLevelSumTypeDiscriminatorNameSuite = suite("with @discriminatorName annotation")(
val topLevelSumTypeNarrowSuite = suite("for top level Invoice sum type with @discriminatorName annotation")(
test("getWithNarrow succeeds in narrowing an Unpaid Invoice instance to Unpaid") {
withSingleIdKeyTable { invoiceTable =>
val keyCond: KeyConditionExpr.PartitionKeyEquals[dynamo.Invoice.Unpaid] =
Expand Down Expand Up @@ -77,7 +77,7 @@ object TypeSafeApiNarrowSpec extends DynamoDBLocalSpec {
paid <- getWithNarrow[dynamo.Invoice, dynamo.Invoice.Paid](invoiceTable)(keyCond).execute.absolve
} yield {
val paid2: dynamo.Invoice.Paid = paid
val ensureDiscriminatorPresent = item == Some(Item("id" -> "1", "invoiceType" -> "Paid", "amount" -> 42))
val ensureDiscriminatorPresent = item == Some(Item("id" -> "1", "invoiceType" -> "Paid", "amount" -> 42))
assertTrue(paid2 == dynamo.Invoice.Paid("1", 42) && ensureDiscriminatorPresent)
}
}
Expand Down

0 comments on commit 93e8222

Please sign in to comment.