예제 #1
0
        public void TestChangedirection()
        {
            Cursor point = new Cursor();
            for (int i = 0; i < 8; i++)
            {
                point.ChangeToNextClockWiseDirection();
            }

            Assert.AreEqual(Direction.DownRight, point.Direction);
        }
예제 #2
0
        public void TestNextMovesCursor()
        {
            Cursor pointer = new Cursor();
            pointer.MoveCursor();
            pointer.MoveCursor();
            pointer.Direction = Direction.Down;

            pointer.MoveCursor();
            pointer.MoveCursor();
            Assert.AreEqual(4, pointer.Row);
            Assert.AreEqual(2, pointer.Column);
            Assert.AreEqual(Direction.Down, pointer.Direction);
        }