public void GetsCorrectPlayerFromInsideOut(PlacedFormation placedFormation, int number, int expectedPlayerIndex) { PlacedPlayer expectedPlayer = placedFormation.skillPlayers[expectedPlayerIndex]; PlacedPlayer returnedPlayer = placedFormation.GetNumberedSkillRight(FlowDirection.InsideOut, number); bool samePlayer = ReferenceEquals(expectedPlayer, returnedPlayer); Assert.True(samePlayer); }
public void NotEnoughReceiversOutsideTackleThrowsExceptionWithProperMessage_02() { PlacedFormation placedFormation = NumberedSkillPlayersPlacedFormationTestData.testPlacedFormations[3]; PlacedFormationException ex = Assert.Throws <PlacedFormationException>(() => placedFormation.GetNumberedSkillRight(FlowDirection.InsideOut, 3)); Assert.Equal("Not enough skill players outside tackle.", ex.Message); }
public void PassingTooLargeAValueThrowsExceptionWithProperMessage() { PlacedFormation placedFormation = new PlacedFormation(); PlacedFormationException ex = Assert.Throws <PlacedFormationException>(() => placedFormation.GetNumberedSkillRight(FlowDirection.OutsideIn, 7)); Assert.Equal("Can't get numbers skill player larger then 6. There are only 6 skill players.", ex.Message); }
public void Passing0ThrowsExceptionWithProperMessage() { PlacedFormation placedFormation = new PlacedFormation(); PlacedFormationException ex = Assert.Throws <PlacedFormationException>(() => placedFormation.GetNumberedSkillRight(FlowDirection.OutsideIn, 0)); Assert.Equal("Can't get 0 numbered skill player.", ex.Message); }