public void ShuffleAndTake_WithCountGreaterThanField_ThrowsArgumentOutOfRangeException() { ILocationShuffler locationShufflerUnderTest = new FisherYatesLocationShuffler(); Action shuffleAction = () => locationShufflerUnderTest.ShuffleAndTake(field, field.Length + 1); shuffleAction.Should().Throw <ArgumentOutOfRangeException>(); }
public void ShuffleAndTake_WithCount_DoesReturnCorrectCount(int count) { ILocationShuffler locationShufflerUnderTest = new FisherYatesLocationShuffler(); IReadOnlyCollection <Location> resultingLocations = locationShufflerUnderTest.ShuffleAndTake(field, count); resultingLocations.Should().HaveCount(count); }