Exemple #1
0
            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());
            }
Exemple #2
0
            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);
            }
Exemple #3
0
            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());
            }