public void SET_Returns3() { WordGrid grid = new WordGrid(6); grid.Lines[3] = "S "; grid.Lines[4] = "E "; grid.Lines[5] = "T "; Assert.IsTrue(grid.FindVerticalWords()); Assert.AreEqual(3, grid.CalculateScore()); }
public void SET_FindsExpectedWord() { WordGrid grid = new WordGrid(6); grid.Lines[3] = "S "; grid.Lines[4] = "E "; grid.Lines[5] = "T "; Assert.IsTrue(grid.FindVerticalWords()); Assert.AreEqual(1, grid.FoundWords.Count); }
public void SET_And_TEST_Returns8() { WordGrid grid = new WordGrid(6); grid.Lines[3] = "S "; grid.Lines[4] = "E "; grid.Lines[5] = "TEST "; Assert.IsTrue(grid.FindVerticalWords()); Assert.IsTrue(grid.FindHorizontalWords()); Assert.AreEqual(8, grid.CalculateScore()); }