Improve test coverage by trapping and promoting tricky checked exceptions you don't really expect or can't handle.
Use either of these repositories:
repositories {
jcenter()
}
or:
repositories {
maven {
url 'https://dl.bintray.com/novacrypto/General/'
}
}
Add dependency:
dependencies {
compile 'io.github.novacrypto:ToRuntime:0.9.0@jar'
}
Migrate from:
Result result;
try {
result = somethingThatThrowsChecked();
} catch (TheChecked checked) {
throw new RuntimeException(checked); // tricky to cover this line
}
To:
import static io.github.novacrypto.toruntime.CheckedExceptionToRuntime.toRuntime;
Result result = toRuntime(() -> somethingThatThrowsChecked());