Konsist: add test to check Node class name.
This commit is contained in:
committed by
Benoit Marty
parent
5d42375151
commit
365acbadef
@@ -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")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user