Konsist: add test to check Node class name.
This commit is contained in:
parent
5d42375151
commit
365acbadef
1 changed files with 11 additions and 0 deletions
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
package io.element.android.app
|
package io.element.android.app
|
||||||
|
|
||||||
|
import com.bumble.appyx.core.node.Node
|
||||||
import com.lemonappdev.konsist.api.Konsist
|
import com.lemonappdev.konsist.api.Konsist
|
||||||
import com.lemonappdev.konsist.api.ext.list.withAllParentsOf
|
import com.lemonappdev.konsist.api.ext.list.withAllParentsOf
|
||||||
import com.lemonappdev.konsist.api.verify.assertTrue
|
import com.lemonappdev.konsist.api.verify.assertTrue
|
||||||
|
|
@ -32,4 +33,14 @@ class KonsistClassNameTest {
|
||||||
it.name.endsWith("Presenter")
|
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