private static void runRandomManyTimesForAllLengths(BankrekeningNummerVerification verification, Action <BankrekeningNummerVerification, string> action) { for (int i = 0; i < 1000; i++) { for (int length = BankrekeningNummerVerification.MinBankrekeningNummerLength; length < BankrekeningNummerVerification.MaxBankrekeningNummerLength; length++) { string generatedBankrekeningNummer = verification.Random(length); action(verification, generatedBankrekeningNummer); } } }
public void Random_invalidLength_TestMethod() { BankrekeningNummerVerification verification = new BankrekeningNummerVerification(); verification.Random(100); // invalid length; should throw an exception }