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