AjErl.Tests.Expressions.MatchExpressionTests.NoMatchWithException C# (CSharp) Method

NoMatchWithException() private method

private NoMatchWithException ( ) : void
return void
        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);
            }
        }