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 RemainderOfTwoIntegers() { RemExpression expr = new RemExpression(new ConstantExpression(6), new ConstantExpression(2)); Assert.AreEqual(0, expr.Evaluate(null)); }