-
Notifications
You must be signed in to change notification settings - Fork 360
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
android/lib/payment/src/main/kotlin/net/mullvad/mullvadvpn/lib/payment/PaymentProvider.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
package net.mullvad.mullvadvpn.lib.payment | ||
|
||
@JvmInline value class PaymentProvider(val paymentRepository: PaymentRepository?) | ||
data class PaymentProvider(val paymentRepository: PaymentRepository?) |
18 changes: 18 additions & 0 deletions
18
...oid/test/arch/src/test/kotlin/net/mullvad/mullvadvpn/test/arch/classes/ValueClassTests.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package net.mullvad.mullvadvpn.test.arch.classes | ||
|
||
import com.lemonappdev.konsist.api.Konsist | ||
import com.lemonappdev.konsist.api.ext.list.modifierprovider.withValueModifier | ||
import com.lemonappdev.konsist.api.ext.list.properties | ||
import com.lemonappdev.konsist.api.verify.assertTrue | ||
import org.junit.Test | ||
|
||
class ValueClassTests { | ||
@Test | ||
fun `ensure value classes property is named value`() { | ||
Konsist.scopeFromProject().classes(includeNested = true).withValueModifier().assertTrue { | ||
it.properties(includeNested = false, includeLocal = false).firstOrNull { property -> | ||
property.name == "value" | ||
} != null | ||
} | ||
} | ||
} |