예제 #1
0
            public void SOCK_NoWordsStartWithCK_ReturnsExpectedResults()
            {
                HiddenWordPuzzle puzzle  = new HiddenWordPuzzle();
                List <string>    results = puzzle.GenerateAllSplitableStrings("sock");

                CollectionAssert.AreEquivalent(new List <string>(), results);
            }
예제 #2
0
            public void LONE_ReturnsExpectedSplitableStrings()
            {
                HiddenWordPuzzle puzzle          = new HiddenWordPuzzle();
                List <string>    results         = puzzle.GenerateAllSplitableStrings("lone");
                List <string>    expectedStrings = new List <string> {
                    "l.one", "lo.ne", "lon.e", //Single dot
                    "l.on.e"                   //double dot
                };

                CollectionAssert.AreEquivalent(expectedStrings, results);
            }
예제 #3
0
            public void TEST_ReturnsExpectedSplitableStrings()
            {
                HiddenWordPuzzle puzzle          = new HiddenWordPuzzle();
                List <string>    results         = puzzle.GenerateAllSplitableStrings("test");
                List <string>    expectedStrings = new List <string> {
                    //"t.est",  //no word starts with est.
                    "te.st",
                    "tes.t"
                };

                CollectionAssert.AreEquivalent(expectedStrings, results);
            }
예제 #4
0
            public void DOMAIN_ReturnsExpectedSplitableStrings()
            {
                HiddenWordPuzzle puzzle          = new HiddenWordPuzzle();
                List <string>    results         = puzzle.GenerateAllSplitableStrings("domain");
                List <string>    expectedStrings = new List <string>
                {
                    "do.main",  //one dot
                    "dom.a.in", //two dots
                    "dom.a.i.n" //three dots
                };

                CollectionAssert.AreEquivalent(expectedStrings, results);
            }
예제 #5
0
            public void ONION_ReturnsExpectedSplitableStrings()
            {
                HiddenWordPuzzle puzzle          = new HiddenWordPuzzle();
                List <string>    results         = puzzle.GenerateAllSplitableStrings("onion");
                List <string>    expectedStrings = new List <string>
                {
                    // ReSharper disable CommentTypo
                    //"o.nion",//No words start with "nion"
                    "on.ion",
                    //"oni.on", //No word starts with 'oni'
                    //"onio.n", //
                    "on.i.on",  //double dot.
                    // ReSharper restore CommentTypo
                };

                CollectionAssert.AreEquivalent(expectedStrings, results);
            }