public void NoMatchWithException()
{
MatchExpression expr = new MatchExpression(new ConstantExpression(123), new ConstantExpression("foo"));
try
{
expr.Evaluate(null);
Assert.Fail();
}
catch (Exception ex)
{
Assert.IsInstanceOfType(ex, typeof(InvalidOperationException));
Assert.AreEqual("no match of right hand side value foo", ex.Message);
}
}