Skip to content

felleslosninger/idporten-generate-fnr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

idporten-generate-fnr

Maven build status Latest Stable Version

Generate random syntetic personidentfiers (fodselsnummer) for Norway. https://www.skatteetaten.no/person/folkeregister/fodsel-og-navnevalg/barn-fodt-i-norge/fodselsnummer/

Requirements

To build and run the library you need:

  • Java 11
  • Maven

Running the library locally

From the command line:

mvn install

See GenerateSynteticFodselsnummerTest.java

To use it to generate test-user in another projects test

Include in pom.xml

        <dependency>
            <groupId>no.idporten.test.generate</groupId>
            <artifactId>idporten-fnr-generate</artifactId>
            <version>0.1.5</version>
            <scope>test</scope>
        </dependency>

Simple usage in UnitTest:

public void test(){
        SyntheticFodselsnummerGenerator synFnrGenerator = new SyntheticFodselsnummerGenerator();
        String personIdentifier = synFnrGenerator.fodselsnummer();
        // Use it and do your testing
}