You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classFoo {
val bar:Map<String, Any?> =mapOf("biz" to mapOf("a" to 1))
}
@Test
funx() {
expectThat(Foo()) {
with({ bar }) {
getValue("biz").isA<Map<String, Int>>().and {
hasEntry("a", 2)
}
}
}
}
The test produces the following output
▼ Expect that Foo@133aca79:
▼ hasEntry("a", 2):
✓ has an entry with the key "biz"
▼ entry ["biz"]:
✓ is an instance of java.util.Map
✓ has an entry with the key "a"
▼ entry ["a"]:
✗ is equal to 2
found 1
The expected output is
▼ Expect that Foo@133aca79:
▼ bar:
✓ has an entry with the key "biz"
▼ entry ["biz"]:
✓ is an instance of java.util.Map
✓ has an entry with the key "a"
▼ entry ["a"]:
✗ is equal to 2
found 1
strikt 0.32.0
The text was updated successfully, but these errors were encountered:
Given this example
The test produces the following output
The expected output is
strikt 0.32.0
The text was updated successfully, but these errors were encountered: