Esempio n. 1
0
        public void TestPush()
        {
            var turtle = new Turtle(new Vector(0, 0), 0.0, ImmutableStack<Turtle.TurtleState>.Empty, dummy, Colors.Black);
            var pushed = turtle.Push();
            var first = pushed.Stack.Peek();
            var pos = first.Position;
            var angle = first.Angle;
            var color = first.DrawColor;

            Assert.AreEqual(turtle.Position, pos);
            Assert.AreEqual(turtle.Angle, angle);
            Assert.AreEqual(turtle.DrawColor, color);
        }