Generate random syntetic personidentfiers (fodselsnummer) for Norway. https://www.skatteetaten.no/person/folkeregister/fodsel-og-navnevalg/barn-fodt-i-norge/fodselsnummer/
To build and run the library you need:
- Java 11
- Maven
From the command line:
mvn install
See GenerateSynteticFodselsnummerTest.java
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
}