isSuccess

Asserts the given Result successful returned a value, returning its result if it did or failing if it didn't.

assertThat(runCatching { 1 + 1 }).isSuccess().isEqualTo(2)