Konsist: add test to check Node class name.

This commit is contained in:
Benoit Marty
2023-10-11 17:11:36 +02:00
committed by Benoit Marty
parent 5d42375151
commit 365acbadef

View File

@@ -16,6 +16,7 @@
package io.element.android.app
import com.bumble.appyx.core.node.Node
import com.lemonappdev.konsist.api.Konsist
import com.lemonappdev.konsist.api.ext.list.withAllParentsOf
import com.lemonappdev.konsist.api.verify.assertTrue
@@ -32,4 +33,14 @@ class KonsistClassNameTest {
it.name.endsWith("Presenter")
}
}
@Test
fun `Classes extending 'Node' should have 'Node' suffix`() {
Konsist.scopeFromProject()
.classes()
.withAllParentsOf(Node::class)
.assertTrue {
it.name.endsWith("Node")
}
}
}