Add Konsist test.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user