Esempio n. 1
0
        public void WhenAddPirateShouldSetPosition()
        {
            //Arrange
            var pirate   = Black.Pirate;
            var stubCell = new StubCell(3, 4);

            //Act
            stubCell.AddPirate(pirate);

            //Assert
            pirate.Position
            .ShouldBeEqual(new Position(3, 4));
        }
Esempio n. 2
0
        public void HeCanNotStayIfThereAreFoes()
        {
            var foe = Red.Pirate;

            amazonCell.PirateComing(foe);

            var stubCell = new StubCell();

            stubCell.AddPirate(pirate);

            // Act
            amazonCell.PirateCanComeFrom(stubCell);

            // Assert
            amazonCell.Pirates.ShouldContain().Exact(foe);
        }
Esempio n. 3
0
        public void HeCanStayIfThereAreAlly()
        {
            var player = new Player(TeamType.Red, TeamType.Black, new TestEmptyRules());
            var ally   = player.GetNextTeam().Pirates.Current;

            pirate = player.GetNextTeam().Pirates.Current;

            amazonCell.PirateComing(ally);

            var stubCell = new StubCell();

            stubCell.AddPirate(pirate);

            // Act
            amazonCell.PirateCanComeFrom(stubCell);
            amazonCell.PirateComing(pirate);

            // Assert
            amazonCell.Pirates.ShouldContain().Elements(ally, pirate);
        }
Esempio n. 4
0
        public void HeCanStayIfThereAreAlly()
        {
            var ally = Red.Pirate;

//            ally.Aliance = TeamType.Black;
//            pirate.Aliance = TeamType.Red;

            fortressCell.PirateComing(ally);

            var stubCell = new StubCell();

            stubCell.AddPirate(pirate);

            // Act
            fortressCell.PirateCanComeFrom(stubCell);
            fortressCell.PirateComing(pirate);

            // Assert
            fortressCell.Pirates.ShouldContain().Elements(ally, pirate);
        }