Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✅ Improve Coverage on data maps #843

Merged
merged 1 commit into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package br.com.colman.petals.withdrawal.data

import io.kotest.core.spec.style.FunSpec
import io.kotest.matchers.shouldBe
import java.time.Duration.ofDays

class AngerTest : FunSpec({

val target = AngerDataPoints

test("Should match the snapshot") {
val snapshot = mapOf(
ofDays(-1) to 0.16,
ofDays(0) to 0.16,
ofDays(2) to 0.35,
ofDays(5) to 0.38,
ofDays(8) to 0.39,
ofDays(11) to 0.40,
ofDays(14) to 0.36,
ofDays(17) to 0.38,
ofDays(20) to 0.20,
ofDays(23) to 0.17,
ofDays(25) to 0.09,
)

target shouldBe snapshot
}
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package br.com.colman.petals.withdrawal.data

import io.kotest.core.spec.style.FunSpec
import io.kotest.matchers.shouldBe
import java.time.Duration.ofDays

class DecreasedAppetiteTest : FunSpec({

val target = DecreasedAppetiteDataPoints

test("Should match the snapshot") {
val snapshot = mapOf(
ofDays(-1) to 0.32,
ofDays(0) to 0.32,
ofDays(2) to 0.89,
ofDays(5) to 0.65,
ofDays(8) to 0.39,
ofDays(11) to 0.36,
ofDays(14) to 0.29,
ofDays(17) to 0.20,
ofDays(20) to 0.19,
ofDays(23) to 0.22,
ofDays(25) to 0.16,
)

target shouldBe snapshot
}
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package br.com.colman.petals.withdrawal.data

import io.kotest.core.spec.style.FunSpec
import io.kotest.matchers.shouldBe
import java.time.Duration.ofDays

class DiscomfortTest : FunSpec({

val target = DiscomfortDataPoints

test("Should match the snapshot") {
val snapshot = mapOf(
ofDays(-1) to 3.5,
ofDays(0) to 3.5,
ofDays(2) to 7.5,
ofDays(5) to 7.3,
ofDays(8) to 6.6,
ofDays(11) to 5.3,
ofDays(14) to 5.0,
ofDays(17) to 5.0,
ofDays(20) to 4.0,
ofDays(23) to 3.5,
ofDays(25) to 3.0,
)

target shouldBe snapshot
}
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package br.com.colman.petals.withdrawal.data

import io.kotest.core.spec.style.FunSpec
import io.kotest.matchers.shouldBe
import java.time.Duration.ofDays

class IrritabilityTest : FunSpec({

val target = IrritabilityDataPoints

test("Should match the snapshot") {
val snapshot = mapOf(
ofDays(-1) to 0.5,
ofDays(0) to 0.5,
ofDays(2) to 0.9,
ofDays(5) to 1.0,
ofDays(8) to 0.85,
ofDays(11) to 0.75,
ofDays(14) to 0.70,
ofDays(17) to 0.66,
ofDays(20) to 0.52,
ofDays(23) to 0.32,
ofDays(25) to 0.26,
)

target shouldBe snapshot
}
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package br.com.colman.petals.withdrawal.data

import io.kotest.core.spec.style.FunSpec
import io.kotest.matchers.shouldBe
import java.time.Duration.ofDays

class NervousnessAnxietyTest : FunSpec({

val target = NervousnessAnxietyDataPoints

test("Should match the snapshot") {
val snapshot = mapOf(
ofDays(-1) to 0.43,
ofDays(0) to 0.43,
ofDays(2) to 0.60,
ofDays(5) to 0.61,
ofDays(8) to 0.54,
ofDays(11) to 0.46,
ofDays(14) to 0.39,
ofDays(17) to 0.37,
ofDays(20) to 0.21,
ofDays(23) to 0.25,
ofDays(25) to 0.25,
)

target shouldBe snapshot
}
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package br.com.colman.petals.withdrawal.data

import io.kotest.core.spec.style.FunSpec
import io.kotest.matchers.shouldBe
import java.time.Duration.ofDays

class RestlessnessTest : FunSpec({

val target = RestlessnessDataPoints

test("Should match the snapshot") {
val snapshot = mapOf(
ofDays(-1) to 0.43,
ofDays(0) to 0.43,
ofDays(2) to 0.71,
ofDays(5) to 1.06,
ofDays(8) to 0.81,
ofDays(11) to 0.53,
ofDays(14) to 0.45,
ofDays(17) to 0.33,
ofDays(20) to 0.29,
ofDays(23) to 0.32,
ofDays(25) to 0.17,
)

target shouldBe snapshot
}
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package br.com.colman.petals.withdrawal.data

import io.kotest.core.spec.style.FunSpec
import io.kotest.matchers.shouldBe
import java.time.Duration.ofDays

class SleepDifficultyTest : FunSpec({

val target = SleepDifficultyDataPoints

test("Should match the snapshot") {
val snapshot = mapOf(
ofDays(-1) to 0.5,
ofDays(0) to 0.5,
ofDays(2) to 1.0,
ofDays(5) to 0.87,
ofDays(8) to 0.90,
ofDays(11) to 0.53,
ofDays(14) to 0.56,
ofDays(17) to 0.97,
ofDays(20) to 0.85,
ofDays(23) to 0.53,
ofDays(25) to 0.53,
)

target shouldBe snapshot
}
})
Loading