public void CreateLevelShouldCreateNewLevel() { var level = new Level(this.numberOfRows, this.numberOfCols, this.numberOfMines); Assert.AreEqual(this.numberOfRows, level.NumberOfRows); Assert.AreEqual(this.numberOfCols, level.NumberOfCols); Assert.AreEqual(this.numberOfMines, level.NumberOfMines); }
public void NumberOfRowsShouldBeInt() { var level = new Level(this.numberOfRows, this.numberOfCols, this.numberOfMines); Assert.IsInstanceOfType(level.NumberOfRows, typeof(int)); }
public void InitializingLevelShouldNotThrow() { var level = new Level(this.numberOfRows, this.numberOfCols, this.numberOfMines); }
public void CreateLevelWithTooLargeNumberOfMinesShouldThrow() { var level = new Level(this.numberOfRows, this.numberOfCols, 425); }
/// <summary> /// Helper method that sets the level of the game to one of the 3 predefined states. /// </summary> /// <param name="level">Parameter holds the level characteristics - dimensions of the playing field and number of mines.</param> private void SelectLevel(Level level) { this.numberOfRows = level.NumberOfRows; this.numberOfCols = level.NumberOfCols; this.NumberOfMines = level.NumberOfMines; }