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
I suspect that displayActual property is working incorrectly. Or it's function is not obvious without the documentation.
Can you explain is this expected behaviour is currently actual? If yes, how can I specify custom error message?
Reproduce:
@Test
fun `fail test message`() {
assertThat(
actual = listOf("1"),
name = "my name",
displayActual = { "display actual" },
).contains("2")
}
Actual: org.opentest4j.AssertionFailedError: expected [my name] to contain:<"2"> but was:<["1"]>
Expected: org.opentest4j.AssertionFailedError: expected [my name] to contain:<"2"> but was:<["display actual"]>]
Lib version verified: "0.26.1", "0.28.0"
The text was updated successfully, but these errors were encountered:
Finally got around explaining this here, displayActual actually controls the rendering of the subject, which is only shown when you have chained assertions. As I point out int the link this behavior is not clear and should probably be rethought.
I suspect that
displayActual
property is working incorrectly. Or it's function is not obvious without the documentation.Can you explain is this expected behaviour is currently actual? If yes, how can I specify custom error message?
Reproduce:
Actual:
org.opentest4j.AssertionFailedError: expected [my name] to contain:<"2"> but was:<["1"]>
Expected:
org.opentest4j.AssertionFailedError: expected [my name] to contain:<"2"> but was:<["display actual"]>
]Lib version verified: "0.26.1", "0.28.0"
The text was updated successfully, but these errors were encountered: