Beispiel #1
0
        public void ItShouldBeWithoutPirates()
        {
            //Arrange
            var stubCell = new StubCell();

            //Assert
            stubCell.Pirates.ShouldBeEmpty();
        }
Beispiel #2
0
        public void ItShouldBeNotDiscovered()
        {
            //Arrange
            var stubCell = new StubCell();

            //Assert
            stubCell.Discoverd.ShouldBeFalse();
        }
Beispiel #3
0
        public void PirateShouldBeReadonly()
        {
            //Arrange
            var stubCell = new StubCell();

            //Assert
            stubCell.Pirates.ShouldBeReadonlyCollection();
        }
Beispiel #4
0
        public void ItShouldNotBeMultistep()
        {
            //Arrange
            var stubCell = new StubCell();

            //Assert
            stubCell.MultiStep.ShouldBeFalse();
        }
Beispiel #5
0
        public void ItShouldBeTerminal()
        {
            //Arrange
            var stubCell = new StubCell();

            //Assert
            stubCell.Terminal.ShouldBeTrue();
        }
Beispiel #6
0
        public void ItShouldCreatePosition()
        {
            //Arrange
            var stubCell = new StubCell(3, 4);

            //Assert
            stubCell.Position.ShouldBeNotNull();
            stubCell.Position.ShouldBeEqual(new Position(3, 4));
        }
        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));
        }
Beispiel #8
0
        public void HeShouldBeTransferedToShip()
        {
            //Arrange
            var stubCell = new StubCell(4, 4);

            stubCell.PirateComing(black);
            black.Position.ShouldBeEqual(stubCell.Position);

            //Act
            baloonCell.PirateComing(black);

            //Assert
            baloonCell.Pirates.ShouldBeEmpty();
            black.Position.ShouldBeEqual(Black.Ship.Position);
        }
Beispiel #9
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);
        }
Beispiel #10
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);
        }
Beispiel #11
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);
        }
 public void Init()
 {
     pirate   = Black.Pirate;
     stubCell = new StubCell();
 }