public void ItsReturnsItsNumberOfLivingUnits()
        {
            var unit = Substitute.For<Unit>();
            var unitTwo = Substitute.For<Unit>();
            unit.Alive().Returns(true);
            unitTwo.Alive().Returns(true);

            var player = new HumanPlayer("", new Unit[] {unit, unitTwo});

            Assert.AreEqual(2, player.LivingUnits());
        }
        public void ItSkipsAnyDeadUnits()
        {
            var unit = Substitute.For<Unit>();
            var unitTwo = Substitute.For<Unit>();
            unit.Alive().Returns(true);
            unitTwo.Alive().Returns(false);

            var player = new HumanPlayer("", new Unit[] {unit, unitTwo});

            Assert.AreEqual(1, player.LivingUnits());
        }
Exemplo n.º 3
0
        public void ItSkipsAnyDeadUnits()
        {
            var unit    = Substitute.For <Unit>();
            var unitTwo = Substitute.For <Unit>();

            unit.Alive().Returns(true);
            unitTwo.Alive().Returns(false);

            var player = new HumanPlayer("", new Unit[] { unit, unitTwo });

            Assert.AreEqual(1, player.LivingUnits());
        }
Exemplo n.º 4
0
        public void ItsReturnsItsNumberOfLivingUnits()
        {
            var unit    = Substitute.For <Unit>();
            var unitTwo = Substitute.For <Unit>();

            unit.Alive().Returns(true);
            unitTwo.Alive().Returns(true);

            var player = new HumanPlayer("", new Unit[] { unit, unitTwo });

            Assert.AreEqual(2, player.LivingUnits());
        }