Add Konsist test.
This commit is contained in:
parent
12c75905f4
commit
cbe2f0684b
1 changed files with 11 additions and 0 deletions
|
|
@ -20,6 +20,7 @@ import com.lemonappdev.konsist.api.ext.list.withoutName
|
|||
import com.lemonappdev.konsist.api.ext.list.withoutNameStartingWith
|
||||
import com.lemonappdev.konsist.api.verify.assertEmpty
|
||||
import com.lemonappdev.konsist.api.verify.assertTrue
|
||||
import io.element.android.libraries.architecture.BaseFlowNode
|
||||
import io.element.android.libraries.architecture.Presenter
|
||||
import org.junit.Test
|
||||
|
||||
|
|
@ -44,6 +45,16 @@ class KonsistClassNameTest {
|
|||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `Classes extending 'BaseFlowNode' should have 'FlowNode' suffix`() {
|
||||
Konsist.scopeFromProject()
|
||||
.classes()
|
||||
.withAllParentsOf(BaseFlowNode::class)
|
||||
.assertTrue {
|
||||
it.name.endsWith("FlowNode")
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `Classes extending 'PreviewParameterProvider' name MUST end with 'Provider' and MUST contain provided class name`() {
|
||||
Konsist.scopeFromProduction()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue