public void SimpleAbcValid() { RegExpEnforcer enforcer = new RegExpEnforcer(); enforcer.Regex = new Regex("abc"); string input = "abc"; Assert.IsEmpty(enforcer.Check(input)); }
public void InvalidInputType() { RegExpEnforcer enforcer = new RegExpEnforcer(); enforcer.Regex = new Regex(""); try { enforcer.Check(34); Assert.Fail("An ArgumentException should have been thrown"); } catch (ArgumentException) { } }