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)); } }
public void NonZeroRemainderOfTwoIntegers() { RemExpression expr = new RemExpression(new ConstantExpression(5), new ConstantExpression(2)); Assert.AreEqual(1, expr.Evaluate(null)); }