-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
VirkningstidspunktGrunnlag legg til avslag og visningsnavn kodeverk (#…
…102) * VirkningstidspunktGrunnlag legg til avslag * Endring av visningsnavn inntekt
- Loading branch information
Showing
5 changed files
with
80 additions
and
14 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
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
4 changes: 4 additions & 0 deletions
4
bidrag-commons/src/main/resources/kodeverk/visningsnavn/inntektsposter.yaml
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,4 @@ | ||
overgangsstoenadTilEnsligMorEllerFarSomBegynteAaLoepe1April2014EllerSenere: "Overgangsstønad" | ||
overgangsstoenadTilEnsligMorEllerFarSomBegynteAaLoepe31Mars2014EllerTidligere: "Overgangsstønad" | ||
overgangsstoenadTilGjenlevendeEktefelle: "Overgangsstønad" | ||
overgangsstoenadTilEnsligForelder: "Overgangsstønad" |
31 changes: 31 additions & 0 deletions
31
bidrag-commons/src/test/kotlin/no/nav/bidrag/commons/service/KodeverkProviderKtTest.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,31 @@ | ||
package no.nav.bidrag.commons.service | ||
|
||
import io.kotest.matchers.shouldBe | ||
import io.mockk.every | ||
import io.mockk.mockkObject | ||
import io.mockk.mockkStatic | ||
import org.junit.jupiter.api.Test | ||
|
||
fun stubKodeverkProvider() { | ||
mockkObject(KodeverkProvider) | ||
mockkStatic(::finnVisningsnavnSkattegrunnlag) | ||
mockkStatic(::finnVisningsnavnLønnsbeskrivelse) | ||
mockkStatic(::finnVisningsnavnForKode) | ||
every { finnVisningsnavnForKode(any(), any()) } returns "Visningsnavn" | ||
every { | ||
finnVisningsnavnLønnsbeskrivelse(any()) | ||
} returns "Visningsnavn lønnsbeskrivelse" | ||
every { finnVisningsnavnSkattegrunnlag(any()) } returns "Visningsnavn skattegrunnlag" | ||
} | ||
|
||
class KodeverkProviderKtTest { | ||
@Test | ||
fun `skal hente visningsnavn`() { | ||
stubKodeverkProvider() | ||
finnVisningsnavn("overgangsstoenadTilEnsligForelder") shouldBe "Overgangsstønad" | ||
finnVisningsnavn("overgangsstoenadTilEnsligMorEllerFarSomBegynteAaLoepe31Mars2014EllerTidligere") shouldBe "Overgangsstønad" | ||
finnVisningsnavn("overgangsstoenadTilEnsligMorEllerFarSomBegynteAaLoepe1April2014EllerSenere") shouldBe "Overgangsstønad" | ||
finnVisningsnavn("overgangsstoenadTilGjenlevendeEktefelle") shouldBe "Overgangsstønad" | ||
finnVisningsnavn("annet") shouldBe "Visningsnavn" | ||
} | ||
} |
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