Exemplo n.º 1
0
        public void ResultTrueTest()
        {
            var manager = new ArgumentsManager();
            var oper    = new ScalarPropositionalOperator('t', manager);

            oper.SetValue(true);
            Assert.True(oper.Result());
        }
Exemplo n.º 2
0
        public void ResultInvalidSameTest()
        {
            var manager = new ArgumentsManager();
            var one     = new ScalarPropositionalOperator('o', manager);

            one.SetValue(true);

            var zero = new ScalarPropositionalOperator('z', manager);

            zero.SetValue(false);

            var opr = new IfThenPropositionalOperator(manager);

            IAsciiBasePropositionalOperator[] arguments = { one, zero };
            opr.Instantiate(arguments);
            Assert.False(opr.Result());
        }