mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
Konsist: add test to check Node class name.
This commit is contained in:
committed by
Benoit Marty
parent
c5fbb9d297
commit
65b83bf266
@@ -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")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user