예제 #1
0
        public void TestShouldMoveTurnShot()
        {
            GuardTower guardTower = new GuardTower();

            guardTower.Move("T");
            Assert.AreEqual(Orientation.East, guardTower.Orientation);

            guardTower.Move("S");
            Assert.AreEqual(29, guardTower.Ammunition);
        }
예제 #2
0
        public void TestShouldTurn()
        {
            GuardTower guardTower = new GuardTower();

            guardTower.Move("T");
            Assert.AreEqual(Orientation.East, guardTower.Orientation);

            guardTower.Move("T");
            Assert.AreEqual(Orientation.South, guardTower.Orientation);

            guardTower.Move("T");
            Assert.AreEqual(Orientation.West, guardTower.Orientation);

            guardTower.Move("T");
            Assert.AreEqual(Orientation.North, guardTower.Orientation);
        }
예제 #3
0
        public void TestShouldMoveForward()
        {
            GuardTower guardTower = new GuardTower();

            guardTower.Move("F");
            Assert.AreEqual(0, guardTower.GetPositionX());
            Assert.AreEqual(0, guardTower.GetPositionY());
        }