Esempio n. 1
0
        public void AndNodeOutputTest()
        {
            var a1 = new AndNode();
            var a2 = new AndNode();
            var a3 = new AndNode();
            var a4 = new AndNode();

            a1.Step(NodeCurrent.Low);
            a1.Step(NodeCurrent.Low);

            a2.Step(NodeCurrent.High);
            a2.Step(NodeCurrent.Low);

            a3.Step(NodeCurrent.Low);
            a3.Step(NodeCurrent.High);

            a4.Step(NodeCurrent.High);
            a4.Step(NodeCurrent.High);

            Assert.IsTrue(a1.Value == NodeCurrent.Low);
            Assert.IsTrue(a2.Value == NodeCurrent.Low);
            Assert.IsTrue(a3.Value == NodeCurrent.Low);
            Assert.IsTrue(a4.Value == NodeCurrent.High);
        }