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

Tester at enum i domenemodellen tilsvarer kodeverk verdier #307

Merged
merged 3 commits into from
Oct 3, 2023
Merged
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,23 @@
package no.nav.helsearbeidsgiver.inntektsmelding.joark.dokument

import io.kotest.core.spec.style.FunSpec
import io.kotest.datatest.withData
import io.kotest.matchers.collections.shouldBeIn
import no.nav.helsearbeidsgiver.felles.inntektsmelding.felles.models.BegrunnelseIngenEllerRedusertUtbetalingKode
import no.nav.helsearbeidsgiver.felles.inntektsmelding.felles.models.NaturalytelseKode
import no.nav.inntektsmelding.xml.kodeliste._20210216.BegrunnelseIngenEllerRedusertUtbetalingKodeliste
import no.nav.inntektsmelding.xml.kodeliste._20210216.NaturalytelseKodeliste

class EnumTilKodeverkListeTest : FunSpec({
context("Sjekk at NaturalytelseKodeliste i kodeverk tilsvarer NaturalYtelseKode i domenemodellen") {
withData(NaturalytelseKode.entries) { kode ->
kode.value shouldBeIn NaturalytelseKodeliste.entries.map { it.value().uppercase() }
}
}

context("Sjekk at BegrunnelseIngenEllerRedusertUtbetalingKodeliste i kodeverk tilsvarer BegrunnelseIngenEllerRedusertUtbetalingKode i domenemodellen") {
withData(BegrunnelseIngenEllerRedusertUtbetalingKode.entries.map { it.value }) { kode ->
kode shouldBeIn BegrunnelseIngenEllerRedusertUtbetalingKodeliste.entries.map { it.value() }
}
}
})