mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
Merge pull request #5503 from element-hq/feature/bma/immutableCleanup
Do some cleanup on our immutable annotation usage
This commit is contained in:
+14
@@ -7,8 +7,12 @@
|
||||
|
||||
package io.element.android.tests.konsist
|
||||
|
||||
import androidx.compose.runtime.Immutable
|
||||
import com.lemonappdev.konsist.api.Konsist
|
||||
import com.lemonappdev.konsist.api.ext.list.withAnnotationOf
|
||||
import com.lemonappdev.konsist.api.ext.list.withNameEndingWith
|
||||
import com.lemonappdev.konsist.api.ext.list.withoutName
|
||||
import com.lemonappdev.konsist.api.verify.assertEmpty
|
||||
import com.lemonappdev.konsist.api.verify.assertFalse
|
||||
import org.junit.Test
|
||||
|
||||
@@ -60,4 +64,14 @@ class KonsistImmutableTest {
|
||||
it.text.contains(".toPersistentMap()")
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `Immutable annotation is not used on sealed interface for Presenter Events`() {
|
||||
Konsist
|
||||
.scopeFromProduction()
|
||||
.interfaces()
|
||||
.withNameEndingWith("Events")
|
||||
.withAnnotationOf(Immutable::class)
|
||||
.assertEmpty()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user