PSEK-Fitnesse-Fixtures  2.3.x (JDK11)
nl.psek.fitnesse.fixtures.general.iban.IbanGenerator Class Reference

A fixture to generate an International Bank Account Number (IBAN) More...

Public Member Functions

 IbanGenerator ()
 Constructs a new IBAN Generator. More...
 
Boolean validateDutchIban (String iban)
 Validates a Dutch IBAN of 18 characters long Using format NLkk BBBB CCCC CCCC CK: NL countryCode kk controlValue BBBB bankCode CCCC CCCC CK accountNumber (including controlvalue) More...
 

Static Public Member Functions

static String generateAccountNumber ()
 Generates a valid accountnumber to use in an IBAN. More...
 
static String generateIBAN (String countryCode, String bankCode)
 Generates an IBAN using a 10 digit generated accountNumber that is a valid Dutch accountnumber. More...
 
static String generateIBAN (String countryCode, String bankCode, String accountNumber)
 Generates an IBAN for accountNumbers between 10 and 30 numerical characters. More...
 
static String getNumericValueFromCharacter (String string)
 Gets numeric value from character. More...
 
static String getNumericValuesFromString (String string)
 Gets numeric values from string. More...
 

Static Private Member Functions

static boolean checkElfProef (int possibleAccountNumber)
 
static int giveNumberOnPosition (int possibleAccountNumber, int position)
 
static int giveRandomStartingNumber ()
 

Static Private Attributes

static final int HIGH = 999999900
 
static final int LOW = 100000000
 

Detailed Description

A fixture to generate an International Bank Account Number (IBAN)

Author
Pascal Smeets https://nl.wikipedia.org/wiki/International_Bank_Account_Number

Definition at line 13 of file IbanGenerator.java.

Constructor & Destructor Documentation

◆ IbanGenerator()

nl.psek.fitnesse.fixtures.general.iban.IbanGenerator.IbanGenerator ( )

Constructs a new IBAN Generator.

Definition at line 22 of file IbanGenerator.java.

Member Function Documentation

◆ checkElfProef()

static boolean nl.psek.fitnesse.fixtures.general.iban.IbanGenerator.checkElfProef ( int  possibleAccountNumber)
staticprivate

Definition at line 154 of file IbanGenerator.java.

◆ generateAccountNumber()

static String nl.psek.fitnesse.fixtures.general.iban.IbanGenerator.generateAccountNumber ( )
static

Generates a valid accountnumber to use in an IBAN.

Accountnumber is a valid Dutch accountnumber.

Returns
string
Exceptions
ConditionalExceptionthe conditional exception

Definition at line 135 of file IbanGenerator.java.

◆ generateIBAN() [1/2]

static String nl.psek.fitnesse.fixtures.general.iban.IbanGenerator.generateIBAN ( String  countryCode,
String  bankCode 
)
static

Generates an IBAN using a 10 digit generated accountNumber that is a valid Dutch accountnumber.

Parameters
countryCodeoption NL or DK
bankCode4 alpha characters
Returns
IBAN number as String

Definition at line 57 of file IbanGenerator.java.

◆ generateIBAN() [2/2]

static String nl.psek.fitnesse.fixtures.general.iban.IbanGenerator.generateIBAN ( String  countryCode,
String  bankCode,
String  accountNumber 
)
static

Generates an IBAN for accountNumbers between 10 and 30 numerical characters.

Parameters
countryCodeoption NL or DK
bankCode4 alpha characters
accountNumber10 - 30 numerical characters, for NL or DK length = 10
Returns
IBAN number as String
Exceptions
ConditionalExceptionthe conditional exception

Definition at line 35 of file IbanGenerator.java.

◆ getNumericValueFromCharacter()

static String nl.psek.fitnesse.fixtures.general.iban.IbanGenerator.getNumericValueFromCharacter ( String  string)
static

Gets numeric value from character.

Parameters
stringthe string
Returns
the numeric value from character

Definition at line 97 of file IbanGenerator.java.

◆ getNumericValuesFromString()

static String nl.psek.fitnesse.fixtures.general.iban.IbanGenerator.getNumericValuesFromString ( String  string)
static

Gets numeric values from string.

Parameters
stringthe string
Returns
the numeric values from string
Exceptions
ConditionalExceptionthe conditional exception

Definition at line 108 of file IbanGenerator.java.

◆ giveNumberOnPosition()

static int nl.psek.fitnesse.fixtures.general.iban.IbanGenerator.giveNumberOnPosition ( int  possibleAccountNumber,
int  position 
)
staticprivate

Definition at line 175 of file IbanGenerator.java.

◆ giveRandomStartingNumber()

static int nl.psek.fitnesse.fixtures.general.iban.IbanGenerator.giveRandomStartingNumber ( )
staticprivate

Definition at line 149 of file IbanGenerator.java.

◆ validateDutchIban()

Boolean nl.psek.fitnesse.fixtures.general.iban.IbanGenerator.validateDutchIban ( String  iban)

Validates a Dutch IBAN of 18 characters long Using format NLkk BBBB CCCC CCCC CK: NL countryCode kk controlValue BBBB bankCode CCCC CCCC CK accountNumber (including controlvalue)

Parameters
ibanthe iban
Returns
boolean
Exceptions
ConditionalExceptionthe conditional exception

Definition at line 75 of file IbanGenerator.java.

Member Data Documentation

◆ HIGH

final int nl.psek.fitnesse.fixtures.general.iban.IbanGenerator.HIGH = 999999900
staticprivate

Definition at line 17 of file IbanGenerator.java.

◆ LOW

final int nl.psek.fitnesse.fixtures.general.iban.IbanGenerator.LOW = 100000000
staticprivate

Definition at line 16 of file IbanGenerator.java.


The documentation for this class was generated from the following file: