use of no.nav.common.types.identer.Fnr in project veilarbportefolje by navikt.
the class BrukerRepositoryTest method skalHenteFnrForPersonIdFraDatabase.
@Test
public void skalHenteFnrForPersonIdFraDatabase() throws Exception {
PersonId personId = PersonId.of("123456");
Fnr expectedFnr = Fnr.ofValidFnr("12345678900");
insertOppfolgingsbrukerForPersonIdToFnrMapping(expectedFnr, personId);
Try<Fnr> result = brukerRepository.retrieveFnrFromPersonid(personId);
assertTrue(result.isSuccess());
assertEquals(expectedFnr, result.get());
}
use of no.nav.common.types.identer.Fnr in project veilarbportefolje by navikt.
the class AktivitetDAOTest method skalHenteBrukertiltakForListeAvFnr.
@Test
public void skalHenteBrukertiltakForListeAvFnr() {
Fnr fnr1 = Fnr.ofValidFnr("11111111111");
Fnr fnr2 = Fnr.ofValidFnr("22222222222");
List<Brukertiltak> brukertiltak = aktivitetDAO.hentBrukertiltak(asList(fnr1, fnr2));
assertThat(brukertiltak.get(0).getTiltak().equals("T1")).isTrue();
assertThat(brukertiltak.get(1).getTiltak().equals("T2")).isTrue();
assertThat(brukertiltak.get(2).getTiltak().equals("T1")).isTrue();
}
use of no.nav.common.types.identer.Fnr in project veilarbportefolje by navikt.
the class PersonRepositoryTest method skalHentePersonifoForFnr.
@Test
void skalHentePersonifoForFnr() {
Fnr fnr = TestDataUtils.randomFnr();
SqlUtils.insert(jdbcTemplate, "OPPFOLGINGSBRUKER").value("PERSON_ID", 11111).value("FODSELSNR", fnr.toString()).value("SIKKERHETSTILTAK_TYPE_KODE", "FYUS").value("SPERRET_ANSATT", "J").execute();
Personinfo personinfo = personRepository.hentPersoninfoForFnr(fnr).get();
assertThat(personinfo.getSikkerhetstiltak()).isEqualTo(Personinfo.kodeTilBeskrivelse.get("FYUS"));
assertThat(personinfo.isEgenAnsatt()).isTrue();
}
use of no.nav.common.types.identer.Fnr in project veilarbportefolje by navikt.
the class FnrTest method skalReturnereStreng.
@Test
public void skalReturnereStreng() throws Exception {
String expected = "12345678900";
Fnr fnr = Fnr.ofValidFnr(expected);
String result = fnr.toString();
assertEquals(expected, result);
}
use of no.nav.common.types.identer.Fnr in project veilarbportefolje by navikt.
the class FnrTest method skalSammenligneBasertPaaVerdi.
@Test
public void skalSammenligneBasertPaaVerdi() throws Exception {
String fnr = "12345678900";
Fnr fnr1 = Fnr.ofValidFnr(fnr);
Fnr fnr2 = Fnr.ofValidFnr(fnr);
assertEquals(fnr1, fnr2);
}
Aggregations