示例#1
0
        public void CalculateLessFalseTest()
        {
            var parameters = new ParameterCollection {
                new Parameter("x", 666)
            };
            var lessOrEqual = new LessOrEqual(Variable.X, new Number(10));

            Assert.False((bool)lessOrEqual.Execute(parameters));
        }
示例#2
0
        public void CalculateLessFalseTest()
        {
            var parameters = new ParameterCollection()
            {
                new Parameter("x", 666)
            };
            var lessThen = new LessOrEqual(new Variable("x"), new Number(10));

            Assert.Equal(false, lessThen.Execute(parameters));
        }
示例#3
0
        public void CalculateLessTrueTest2()
        {
            var parameters = new ParameterCollection()
            {
                new Parameter("x", 10)
            };
            var lessThen = new LessOrEqual(Variable.X, new Number(10));

            Assert.True((bool)lessThen.Execute(parameters));
        }
示例#4
0
        public void CalculateInvalidTypeTest()
        {
            var lessOrEqual = new LessOrEqual(new Bool(true), new Bool(true));

            Assert.Throws <ResultIsNotSupportedException>(() => lessOrEqual.Execute());
        }