public void DestroyUnitNullUnit() { var units = new UnitList(new BattleCalculator(new DieRoller()), new TerrainMap(new ShortestPath())); units.DestroyUnit(null); Assert.Equal(0, units.Count); }
public void DestroyUnitEmptyList() { var units = new UnitList(new BattleCalculator(new DieRoller()), new TerrainMap(new ShortestPath())); var unit = new Unit(new ShortestPath()) { Col = 5, Row = 5, UnitType = 1, Nationality = NATIONALITY.USA }; units.DestroyUnit(unit); Assert.Equal(0, units.Count); }
public void DestroyUnit() { IocContainer.Setup(); var units = new UnitList(new BattleCalculator(new DieRoller()), new TerrainMap(new ShortestPath())); units.Add(2, 2, 0, NATIONALITY.Germany); units.Add(3, 3, 0, NATIONALITY.USA); units.Add(4, 4, 0, NATIONALITY.Germany); Unit unit = units[1]; units.DestroyUnit(unit); Assert.Equal(2, units.Count); Assert.Equal(2, units[0].Col); Assert.Equal(2, units[0].Row); Assert.Equal(4, units[1].Col); Assert.Equal(4, units[1].Row); }