in strikt how would i assert that an Optional does...
# strikt
c
in strikt how would i assert that an Optional does not contain a Throwable, and when it does print the throwable including stacktrace?
this works:
Copy code
get { throwable.orElse(null) }.isNull()
but it does not show the stacktrace
Copy code
get { throwable.orElse(null)?.stackTraceToString() }.isEqualTo(null)
sadly
isNull
acts different from
isEqualToNull
and does not show the actual value. I think
isNull
should just delegate to
isEqualTo(null)
r
I'd write a custom assertion extension that passes the stacktrack to
fail