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 had to use kotlin.test’s assertFailsWith() even though I generally prefer assertk’s APIs, because assertk doesn’t have a function that lets me expect a failure of a specific type in one go.
This PR migrated about 500 exception tests in OkHttp from this form:
to this form:
assertFailsWith<SomeSpecificExceptionType> { doThing() }
I had to use kotlin.test’s assertFailsWith() even though I generally prefer assertk’s APIs, because assertk doesn’t have a function that lets me expect a failure of a specific type in one go.
I know I could have done this:
assertFailure { doThing() }.isInstanceOf<SomeSpecificExceptionType>()
But it’s more code, and I’m in the code deleting business.
The text was updated successfully, but these errors were encountered: