Skip to content

Commit

Permalink
infra(BE-121"): kover support
Browse files Browse the repository at this point in the history
 - fix build issue
  • Loading branch information
hanrw committed Nov 22, 2023
1 parent 34fe2e7 commit 5b2fa64
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 43 deletions.
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ dependencies {
}

koverReport {

filters {
excludes {
classes(
"**Platform*",
"*.LemonSqueezyApi**",
"com.snacks.**.internal.ktor.*",
"*.BuildConfig",
"*.BuildKonfig", // BuildKonfig generated
Expand Down
6 changes: 6 additions & 0 deletions shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ kotlin {
}
}

tasks {
named<Test>("jvmTest") {
useJUnitPlatform()
}
}

multiplatformSwiftPackage {
swiftToolsVersion("5.9")
targetPlatforms {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ interface LicenseApi {
suspend fun activeLicense(licenseKey: String, instanceName: String): LicenseActivationResult

suspend fun deactivateLicense(licenseKey: String, instanceId: String): LicenseDeactivationResponse

companion object
}

internal class LemonSqueezyLicenseApi(
Expand Down Expand Up @@ -124,35 +122,15 @@ data class LicenseKey(
val createdAt: String,
@SerialName("expires_at")
val expiresAt: String?,
) {
companion object {
fun mock() = LicenseKey(
id = 1,
status = "active",
key = "your_license_key",
activationLimit = 1,
activationUsage = 0,
createdAt = "2021-01-01T00:00:00.000Z",
expiresAt = null,
)
}
}
)

@Serializable
data class Instance(
val id: String,
val name: String,
@SerialName("created_at")
val createdAt: String,
) {
companion object {
fun mock() = Instance(
id = "your_instance_id",
name = "your_instance_name",
createdAt = "2021-01-01T00:00:00.000Z",
)
}
}
)

@Serializable
data class Meta(
Expand All @@ -176,19 +154,4 @@ data class Meta(
val customerName: String,
@SerialName("customer_email")
val customerEmail: String,
) {
companion object {
fun mock() = Meta(
storeId = 1,
orderId = 1,
orderItemId = 1,
productId = 1,
productName = "your_product_name",
variantId = 1,
variantName = "your_variant_name",
customerId = 1,
customerName = "your_customer_name",
customerEmail = "your_customer_email",
)
}
}
)
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package com.snacks.lemonsqueezy.api

import org.junit.Assert.assertEquals
import org.junit.Test
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test


class LemonSqueezyApiTest {

Expand Down

0 comments on commit 5b2fa64

Please sign in to comment.