Esempio n. 1
0
        public void RaiseIfRemainderRealByInteger()
        {
            RemExpression expr = new RemExpression(new ConstantExpression(6.5), new ConstantExpression(2));

            try
            {
                expr.Evaluate(null);
                Assert.Fail();
            }
            catch (Exception ex)
            {
                Assert.IsInstanceOfType(ex, typeof(InvalidCastException));
            }
        }
Esempio n. 2
0
        public void NonZeroRemainderOfTwoIntegers()
        {
            RemExpression expr = new RemExpression(new ConstantExpression(5), new ConstantExpression(2));

            Assert.AreEqual(1, expr.Evaluate(null));
        }