Konsist: add test to check Node class name.
This commit is contained in:
parent
c5fbb9d297
commit
65b83bf266
1 changed files with 11 additions and 0 deletions
|
|
@ -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")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue