-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Description
Given this example
class Foo {
val bar: Map<String, Any?> = mapOf("biz" to mapOf("a" to 1))
}
@Test
fun x() {
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
Metadata
Metadata
Assignees
Labels
No labels