-
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.
F - Legger inn preutfylling for 6000 for gjenny, uten vedtak
- Loading branch information
Showing
5 changed files
with
86 additions
and
6 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
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
42 changes: 41 additions & 1 deletion
42
src/test/kotlin/no/nav/eessi/pensjon/prefill/PrefillServiceTest.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 |
---|---|---|
@@ -1,22 +1,62 @@ | ||
package no.nav.eessi.pensjon.prefill | ||
import io.mockk.every | ||
import io.mockk.mockk | ||
import no.nav.eessi.pensjon.eux.model.SedType | ||
import no.nav.eessi.pensjon.prefill.models.EessiInformasjon | ||
import no.nav.eessi.pensjon.prefill.models.EessiInformasjonMother | ||
import no.nav.eessi.pensjon.prefill.models.PersonDataCollection | ||
import no.nav.eessi.pensjon.prefill.models.PrefillDataModelMother | ||
import no.nav.eessi.pensjon.prefill.person.PrefillPDLAdresse | ||
import no.nav.eessi.pensjon.prefill.person.PrefillPDLNav | ||
import no.nav.eessi.pensjon.prefill.sed.PrefillSEDService | ||
import no.nav.eessi.pensjon.prefill.sed.PrefillTestHelper | ||
import no.nav.eessi.pensjon.shared.api.PersonId | ||
import no.nav.eessi.pensjon.shared.api.PrefillDataModel | ||
import no.nav.eessi.pensjon.shared.person.FodselsnummerGenerator | ||
import no.nav.eessi.pensjon.statistikk.AutomatiseringStatistikkService | ||
import org.junit.Test | ||
import org.junit.jupiter.api.BeforeEach | ||
|
||
class PrefillServiceTest { | ||
private val personFnr = FodselsnummerGenerator.generateFnrForTest(57) | ||
private val avdodPersonFnr = FodselsnummerGenerator.generateFnrForTest(63) | ||
|
||
private val mockPrefillSEDService: PrefillSEDService = mockk() | ||
private val innhentingService: InnhentingService = mockk() | ||
private val automatiseringStatistikkService: AutomatiseringStatistikkService = mockk() | ||
|
||
private lateinit var prefillData: PrefillDataModel | ||
private lateinit var prefillSEDService: PrefillSEDService | ||
private lateinit var dataFromPEN: PensjonsinformasjonService | ||
private lateinit var prefillService: PrefillService | ||
private lateinit var personcollection: PersonDataCollection | ||
private lateinit var personDataCollection: PersonDataCollection | ||
private lateinit var prefillNav: PrefillPDLNav | ||
private lateinit var eessiInformasjon: EessiInformasjon | ||
|
||
@BeforeEach | ||
fun `startup initilize testing`() { | ||
prefillService = PrefillService(mockPrefillSEDService, innhentingService, automatiseringStatistikkService) | ||
personcollection = PersonDataCollection(null, null) | ||
val personDataCollectionFamilie = PersonPDLMock.createEnkelFamilie(personFnr, avdodPersonFnr) | ||
personDataCollection = PersonDataCollection(gjenlevendeEllerAvdod = personDataCollectionFamilie.ektefellePerson, forsikretPerson = personDataCollectionFamilie.forsikretPerson ) | ||
|
||
prefillNav = PrefillPDLNav( | ||
prefillAdresse = mockk<PrefillPDLAdresse> { | ||
every { hentLandkode(any()) } returns "NO" | ||
every { createPersonAdresse(any()) } returns mockk() | ||
}, | ||
institutionid = "NO:noinst002", | ||
institutionnavn = "NOINST002, NO INST002, NO" | ||
) | ||
|
||
eessiInformasjon = EessiInformasjonMother.standardEessiInfo() | ||
} | ||
|
||
@Test | ||
fun `En p6000 uten vedtak skal gi en delvis utfylt sed`(){ | ||
dataFromPEN = PrefillTestHelper.lesPensjonsdataVedtakFraFil("/pensjonsinformasjon/vedtak/P6000-GP-401.xml") | ||
prefillData = PrefillDataModelMother.initialPrefillDataModel(SedType.P6000, personFnr, penSaksnummer = "22580170", vedtakId = "12312312", avdod = PersonId(avdodPersonFnr, "1234567891234")) | ||
prefillSEDService = PrefillSEDService(eessiInformasjon, prefillNav) | ||
} | ||
|
||
} |
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