Skip to content

Commit cbe2f06

Browse files
committed
Add Konsist test.
1 parent 12c7590 commit cbe2f06

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/konsist/src/test/kotlin/io/element/android/tests/konsist/KonsistClassNameTest.kt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import com.lemonappdev.konsist.api.ext.list.withoutName
2020
import com.lemonappdev.konsist.api.ext.list.withoutNameStartingWith
2121
import com.lemonappdev.konsist.api.verify.assertEmpty
2222
import com.lemonappdev.konsist.api.verify.assertTrue
23+
import io.element.android.libraries.architecture.BaseFlowNode
2324
import io.element.android.libraries.architecture.Presenter
2425
import org.junit.Test
2526

@@ -44,6 +45,16 @@ class KonsistClassNameTest {
4445
}
4546
}
4647

48+
@Test
49+
fun `Classes extending 'BaseFlowNode' should have 'FlowNode' suffix`() {
50+
Konsist.scopeFromProject()
51+
.classes()
52+
.withAllParentsOf(BaseFlowNode::class)
53+
.assertTrue {
54+
it.name.endsWith("FlowNode")
55+
}
56+
}
57+
4758
@Test
4859
fun `Classes extending 'PreviewParameterProvider' name MUST end with 'Provider' and MUST contain provided class name`() {
4960
Konsist.scopeFromProduction()

0 commit comments

Comments
 (0)