Skip to content

Instantly share code, notes, and snippets.

@olegosipenko
Created September 19, 2019 10:52
Show Gist options
  • Save olegosipenko/b25c3caa832c047f5b2fdce848493265 to your computer and use it in GitHub Desktop.
Save olegosipenko/b25c3caa832c047f5b2fdce848493265 to your computer and use it in GitHub Desktop.
For blog post about sealed classes, when expressions and custom detekt rule
@DisplayName("compliant ")
@MethodSource("compliantProvider")
@ParameterizedTest(name = "{1} should not warn")
internal fun testCompliantWhen(source: String, whenKind: String) {
val findings = NonExhaustiveWhen().lint(source)
assertThat(findings).isEmpty()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment