-
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.
t - Enkel test for isFnrDnrSinFdatoLikSedFdato
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
src/test/kotlin/no/nav/eessi/pensjon/personoppslag/pdl/model/SEDPersonRelasjonTest.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,29 @@ | ||
package no.nav.eessi.pensjon.personoppslag.pdl.model | ||
|
||
import no.nav.eessi.pensjon.shared.person.Fodselsnummer | ||
import org.junit.jupiter.api.Assertions.assertEquals | ||
import org.junit.jupiter.api.BeforeEach | ||
import org.junit.jupiter.api.Test | ||
import java.time.LocalDate | ||
|
||
private const val FNR = "11067122781" | ||
class SEDPersonRelasjonTest { | ||
|
||
@BeforeEach | ||
fun setUp() { | ||
} | ||
|
||
@Test | ||
fun isFnrDnrSinFdatoLikSedFdato() { | ||
var sedPersonRelasjon = SEDPersonRelasjon( | ||
fnr = Fodselsnummer.fra(FNR), | ||
relasjon = Relasjon.FORSIKRET, | ||
fdato = LocalDate.now(), | ||
rinaDocumentId = "" | ||
) | ||
assertEquals(sedPersonRelasjon.isFnrDnrSinFdatoLikSedFdato(),false) | ||
|
||
sedPersonRelasjon = sedPersonRelasjon.copy(fdato = LocalDate.of(1971, 6, 11)) | ||
assertEquals(sedPersonRelasjon.isFnrDnrSinFdatoLikSedFdato(),true) | ||
} | ||
} |