public void RegularExpressionRuleIsValid() { string regularExpressionText = RegularExpressionConstants.Name; string target = "Matt Valencia"; RegularExpression rule = new RegularExpression("RegularExpressionIsValid", "The RegularExpression does not match.", target, regularExpressionText); Result result = rule.Execute(); Assert.IsTrue(result.IsValid); Assert.IsNotNullOrEmpty(result.Message); Assert.IsNotNull(result.RulePolicy); Assert.AreEqual(result.RulePolicy.Severity, Severity.Exception); }