public void ShouldCheckForWinAndNotMatch() { var hardPuzzle = new HardPuzzle(); Assert.IsInstanceOfType(hardPuzzle, typeof(HardPuzzle)); Assert.IsInstanceOfType(hardPuzzle, typeof(Puzzle)); hardPuzzle.CreatePuzzle(); Assert.IsNotNull(hardPuzzle.PuzzleArray); var result = hardPuzzle.Check(); Assert.IsFalse(result); }
public void CreateAHardPuzzleFromGenerator() { var hardPuzzle = new HardPuzzle(); Assert.IsInstanceOfType(hardPuzzle, typeof(HardPuzzle)); Assert.IsInstanceOfType(hardPuzzle, typeof(Puzzle)); hardPuzzle.CreatePuzzle(); Assert.IsNotNull(hardPuzzle.PuzzleArray); BuildLogString(hardPuzzle.PuzzleArray); WriteLog(); Assert.IsTrue(_log.Contains("0")); Assert.AreEqual((int)Difficulty.Hard, _log.Count(s => s == '0')); }