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)); }
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); }
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); }
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); }