Add Konsist test.
This commit is contained in:
parent
a45e9d23c2
commit
17c1f21927
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.ext.list.withoutNameStartingWith
|
||||||
import com.lemonappdev.konsist.api.verify.assertEmpty
|
import com.lemonappdev.konsist.api.verify.assertEmpty
|
||||||
import com.lemonappdev.konsist.api.verify.assertTrue
|
import com.lemonappdev.konsist.api.verify.assertTrue
|
||||||
|
import io.element.android.libraries.architecture.BaseFlowNode
|
||||||
import io.element.android.libraries.architecture.Presenter
|
import io.element.android.libraries.architecture.Presenter
|
||||||
import org.junit.Test
|
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
|
@Test
|
||||||
fun `Classes extending 'PreviewParameterProvider' name MUST end with 'Provider' and MUST contain provided class name`() {
|
fun `Classes extending 'PreviewParameterProvider' name MUST end with 'Provider' and MUST contain provided class name`() {
|
||||||
Konsist.scopeFromProduction()
|
Konsist.scopeFromProduction()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue