public void Complete_TestMethod() { BSNVerification verification = new BSNVerification(); foreach (string becomesNineDigit in becomesNineDigits) { string nineDigit = verification.Complete(becomesNineDigit); bool valid = verification.IsValid(nineDigit); Assert.IsTrue(valid, "Completed {0} into {1}, but {1} was not valid", becomesNineDigit, nineDigit); } }
public void Complete_cannotBecomeTenDigits_TestMethod() { BSNVerification verification = new BSNVerification(); Exception exception = null; foreach (string cannotBecomeNineDigit in cannotBecomeNineDigits) { try { string nineDigit = verification.Complete(cannotBecomeNineDigit); Assert.Inconclusive("It should not be possible that {0} completed into {1}", Reflector.GetNameSeparatorValue(new { cannotBecomeNineDigit }), Reflector.GetNameSeparatorValue(new { nineDigit })); } catch (Exception ex) { exception = ex; continue; } } throw exception; }