Skip to content

Commit 3ba463b

Browse files
authored
Merge pull request #4 from navikt/grunnbelopFiks
fiks test og mai2020
2 parents 9c446ec + 1114555 commit 3ba463b

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

grunnbelop/src/main/kotlin/no/nav/dagpenger/grunnbelop/Grunnbelop.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,5 @@ fun getGrunnbeløpForDato(dato: LocalDate): Grunnbeløp {
4343
}
4444

4545
fun Grunnbeløp.gjelderFor(dato: LocalDate): Boolean {
46-
return !(dato.isBefore(this.fom) || (dato.isAfter(this.tom)))
46+
return !(dato.isBefore(this.fom))
4747
}

grunnbelop/src/test/kotlin/no/nav/dagpenger/grunnbelop/GrunnbelopTest.kt

+8-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ import java.time.YearMonth
88

99
class GrunnbelopTest {
1010

11+
@Test
12+
fun ` Skal returnere grunnbeløp på 99858 for måned mai 2020 `() {
13+
14+
Assertions.assertEquals(99858.toBigDecimal(), getGrunnbeløpForMåned(YearMonth.of(2020, Month.MAY)).verdi)
15+
}
16+
1117
@Test
1218
fun ` Skal returnere grunnbeløp på 99858 for måned april 2020 `() {
1319

@@ -39,13 +45,13 @@ class GrunnbelopTest {
3945
}
4046

4147
@Test
42-
fun ` Skal returnere grunnbeløp på 90068 for måned mars 2015 `() {
48+
fun ` Skal returnere grunnbeløp på 90068 for måned august 2015 `() {
4349

4450
Assertions.assertEquals(90068.toBigDecimal(), getGrunnbeløpForMåned(YearMonth.of(2015, Month.AUGUST)).verdi)
4551
}
4652

4753
@Test
48-
fun ` Skal returnere grunnbeløp på 90068 for dato 06032015 `() {
54+
fun ` Skal returnere grunnbeløp på 90068 for dato 06082015 `() {
4955

5056
Assertions.assertEquals(90068.toBigDecimal(), getGrunnbeløpForDato(LocalDate.of(2015, 8, 6)).verdi)
5157
}

0 commit comments

Comments
 (0)