-
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.
Definerer søknadstype og validerer tom. dato på søknadsperiode. (#475)
* Definerer søknadstype og validerer tom. dato på søknadsperiode. Krever at tilOgMed dato er satt på søknadsperiode om søknadstype er RAPPORTERING_SØKNAD. Ellers kan tilOgMed dato være null. * Setter tidenes ende for deltakelsesøknad uten tom dato.
- Loading branch information
Showing
6 changed files
with
70 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package no.nav.k9.søknad; | ||
|
||
import java.time.LocalDate; | ||
import java.time.Month; | ||
|
||
public final class TidUtils { | ||
|
||
public static LocalDate TIDENES_ENDE = LocalDate.of(9999, Month.DECEMBER, 31); | ||
} |
6 changes: 6 additions & 0 deletions
6
soknad/src/main/java/no/nav/k9/søknad/ytelse/ung/v1/UngSøknadstype.java
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,6 @@ | ||
package no.nav.k9.søknad.ytelse.ung.v1; | ||
|
||
public enum UngSøknadstype { | ||
DELTAKELSE_SØKNAD, | ||
RAPPORTERING_SØKNAD | ||
} |
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
6 changes: 4 additions & 2 deletions
6
soknad/src/test/java/no/nav/k9/søknad/ytelse/ung/YtelseEksempel.java
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 |
---|---|---|
@@ -1,16 +1,18 @@ | ||
package no.nav.k9.søknad.ytelse.ung; | ||
|
||
import no.nav.k9.søknad.felles.type.Periode; | ||
import no.nav.k9.søknad.ytelse.ung.v1.UngSøknadstype; | ||
import no.nav.k9.søknad.ytelse.ung.v1.Ungdomsytelse; | ||
|
||
import java.math.BigDecimal; | ||
|
||
public class YtelseEksempel { | ||
|
||
public static Ungdomsytelse komplettYtelseMedSøknadsperiode(Periode søknadsperiode, BigDecimal inntekt) { | ||
public static Ungdomsytelse komplettYtelseMedSøknadsperiode(Periode søknadsperiode, BigDecimal inntekt, UngSøknadstype søknadstype) { | ||
|
||
return new Ungdomsytelse() | ||
.medSøknadsperiode(søknadsperiode) | ||
.medInntekt(inntekt); | ||
.medInntekt(inntekt) | ||
.medSøknadType(søknadstype); | ||
} | ||
} |
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