NinoGenerator

uk.gov.hmrc.domain.NinoGenerator
See theNinoGenerator companion object
case class NinoGenerator(random: Random) extends Modulus23Check

A generator that should be used Only for Testing!

Rules for the Nino: https://en.wikipedia.org/wiki/National_Insurance_number#Format

Generates a Nino from a random seed. You can use a specific seed to generate a Nino so it is going to be more predictable.

Attributes

Example

NinoGenerator(seed).nextNino.nino

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Modulus23Check
trait ModulusCheck
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def nextNino: Nino

Inherited methods

protected def calculateCheckCharacter(utr: String): Char

Attributes

Inherited from:
ModulusCheck
protected def isCheckCorrect(utr: String, checkPosition: Int): Boolean

Attributes

Inherited from:
ModulusCheck
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product

Inherited fields

override protected val checkString: String

Attributes

Inherited from:
Modulus23Check
override protected val mod: Int

Attributes

Inherited from:
Modulus23Check
override protected val weights: List[Int]

Attributes

Inherited from:
Modulus23Check