public void PlaceMines_WithBadLuck_ResultsInClickedLocationIsMine(uint clickedLocationX, uint clickedLocationY) { Location clickedLocation = new(clickedLocationX, clickedLocationY); LocationShufflerToTest locationShuffler = new(mineLocations); IMinelayer minelayerUnderTest = new RandomMinelayer(locationShuffler); IEnumerable <Location> placedMines = minelayerUnderTest.PlaceMines(field, (uint)mineLocations.Length, clickedLocation); placedMines.Should().Contain(clickedLocation); }
public void PlaceMines_IgnoresClickedLocation(uint clickedLocationX, uint clickedLocationY) { Location clickedLocation = new(clickedLocationX, clickedLocationY); LocationShufflerToTest locationShuffler = new(mineLocations); IMinelayer minelayerUnderTest = new RandomMinelayer(locationShuffler); IEnumerable <Location> placedMines = minelayerUnderTest.PlaceMines(field, (uint)mineLocations.Length, clickedLocation); placedMines.Should().HaveCount(mineLocations.Length); placedMines.Should().BeEquivalentTo(mineLocations); }