Пример #1
0
        public void BoolTrueEqualTest()
        {
            var equal = new NotEqual(new Bool(true), new Bool(true));
            var result = (bool)equal.Execute();

            Assert.Equal(false, result);
        }
Пример #2
0
        public void BoolTrueAndFalseVarEqualTest()
        {
            var parameters = new ParameterCollection()
            {
                new Parameter("x", true),
                new Parameter("y", false)
            };
            var equal = new NotEqual(new Variable("x"), new Variable("y"));
            var result = (bool)equal.Execute(parameters);

            Assert.Equal(true, result);
        }
Пример #3
0
        public void NumberEqualTest()
        {
            var equal = new NotEqual(new Number(11), new Number(10));
            var result = (bool)equal.Execute();

            Assert.Equal(true, result);
        }
Пример #4
0
        public void NumberVarEqualTest()
        {
            var parameters = new ParameterCollection()
            {
                new Parameter("x", 11),
                new Parameter("y", 10)
            };
            var equal = new NotEqual(new Variable("x"), new Variable("y"));
            var result = (bool)equal.Execute(parameters);

            Assert.Equal(true, result);
        }
Пример #5
0
        public void NumberAndBoolVarEqualTest()
        {
            var parameters = new ParameterCollection()
            {
                new Parameter("x", 10),
                new Parameter("y", false)
            };
            var equal = new NotEqual(new Variable("x"), new Variable("y"));

            Assert.Throws<NotSupportedException>(() => (bool)equal.Execute(parameters));
        }