Exemplo n.º 1
0
        public void BoolTrueEqualTest()
        {
            var equal = new NotEqual(new Bool(true), new Bool(true));
            var result = (bool)equal.Execute();

            Assert.Equal(false, result);
        }
Exemplo n.º 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);
        }
Exemplo n.º 3
0
        public void NumberEqualTest()
        {
            var equal = new NotEqual(new Number(11), new Number(10));
            var result = (bool)equal.Execute();

            Assert.Equal(true, result);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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));
        }