예제 #1
0
        public void TestScoreAndDespawn()
        {
            lane = new Lane(FieldTest.CELLS_NUM);
            lane.AddUnit(unit1);

            for (int i = 0; i < FieldTest.CELLS_NUM; i++)
            {
                Assert.AreEqual(i, lane.GetUnits()[unit1]);
                lane.Update();
            }

            Assert.AreEqual(1, lane.GetScore(PlayerType.PLAYER1));
            Assert.IsFalse(lane.GetUnits().ContainsKey(unit1));
        }
예제 #2
0
 public void TestAddUnitAndGetLenght()
 {
     Assert.AreEqual(0, lane.GetUnits()[unit1]);
     Assert.AreEqual(FieldTest.CELLS_NUM - 1, lane.GetUnits()[unit2]);
 }
예제 #3
0
 public void TestAddUnitLane()
 {
     lane.AddUnit(unit1);
     Assert.AreEqual(unit1, lane.GetUnits());
     /*Si possono aggiungere altre unita', ma il test cambierebbe cosi. */
 }