summaryrefslogtreecommitdiffhomepage
path: root/android/test
diff options
context:
space:
mode:
Diffstat (limited to 'android/test')
-rw-r--r--android/test/arch/src/test/kotlin/net/mullvad/mullvadvpn/test/arch/classes/DataClassTest.kt11
1 files changed, 10 insertions, 1 deletions
diff --git a/android/test/arch/src/test/kotlin/net/mullvad/mullvadvpn/test/arch/classes/DataClassTest.kt b/android/test/arch/src/test/kotlin/net/mullvad/mullvadvpn/test/arch/classes/DataClassTest.kt
index c20277b1d9..eddcd4fe90 100644
--- a/android/test/arch/src/test/kotlin/net/mullvad/mullvadvpn/test/arch/classes/DataClassTest.kt
+++ b/android/test/arch/src/test/kotlin/net/mullvad/mullvadvpn/test/arch/classes/DataClassTest.kt
@@ -12,6 +12,15 @@ class DataClassTest {
Konsist.scopeFromProject()
.classes(includeNested = true)
.withDataModifier()
- .properties(includeNested = true)
+ // If includeNested is set to true the test would fail on properties of nested classes
+ // of data classes, even if those classes are not used as a property of the data class.
+ // For example:
+ // data class Immutable(val a: String) {
+ // class Mutable {
+ // var b: String = ""
+ // }
+ // }
+ // would fail because the nested class Mutable has a var property.
+ .properties(includeNested = false)
.assertFalse { it.isVar }
}