public void CheckRuleWithExpressionCausingNullRefException() { var executor = new MessageCollector <string>(() => (string)null); var results = executor.Assert(x => x.Length > 2).Results; Assert.AreEqual(1, results.ToList().Count); }
public void CheckRuleWithExpressionCausingFormatException() { var executor = new MessageCollector <string>(() => "Hello"); var result = executor.Assert(x => bool.Parse(x.Length.ToString())).Results; }