public void GivenValidPuzzleWithTwoWordsWhenCallingGetWordsMapThenGetWordsMapReturnsAWordsMapDecoratorWithTwoWords(WordSearchPuzzle puzzle, WordsMapDecorator expected)
        {
            sut = new WordsLocationFinder(puzzle);

            WordsMapDecorator result = sut.GetWordsMap();

            Assert.AreEqual(expected, result);
        }
        public void GivenValidPuzzleWhenCallingGetWordsMapThenGetWordsMapReturnsAWordsMapDecorator(WordSearchPuzzle puzzle)
        {
            sut = new WordsLocationFinder(puzzle);

            WordsMapDecorator result = sut.GetWordsMap();

            Assert.IsInstanceOf <WordsMapDecorator>(result);
        }
        public void GivenAValidStringFileNameContainingAValidWordPuzzleWhenPassedIntoParseFileToWordSearchPuzzleThenResultingWordSearchPuzzleGetWordsListHasTheSolution(Dictionary <String, List <Vector2> > expected)
        {
            WordSearchPuzzle    puzzle      = sut.ParseFileToWordSearchPuzzle(testPuzzlePath + "Example15x15.txt");
            WordsLocationFinder wordsFinder = new WordsLocationFinder(puzzle);
            WordsMapDecorator   result      = wordsFinder.GetWordsMap();

            Assert.AreEqual(expected, result);
        }
        public void GivenAValidStringFileNameContaingAPuzzleWithOneWordWhenPassedToParseFileToWordSearchPuzzleThenResultingWordSearchPuzzleGetWordsLocationHasTheSolution()
        {
            WordSearchPuzzle    puzzle                  = sut.ParseFileToWordSearchPuzzle(testPuzzlePath + "oneWord4x4.txt");
            WordsLocationFinder wordsFinder             = new WordsLocationFinder(puzzle);
            Dictionary <String, List <Vector2> > result = wordsFinder.GetWordsMap();

            List <Vector2> kirkLocation = new List <Vector2>();

            kirkLocation.Add(new Vector2(3, 0));
            kirkLocation.Add(new Vector2(2, 0));
            kirkLocation.Add(new Vector2(1, 0));
            kirkLocation.Add(new Vector2(0, 0));
            Dictionary <String, List <Vector2> > wordsLocation = new Dictionary <String, List <Vector2> >();

            wordsLocation.Add("KIRK", kirkLocation);
            WordsMapDecorator expected = new WordsMapDecorator(wordsLocation);

            Assert.AreEqual(expected, result);
        }
        public void GivenInvalidPuzzleWhenCallingGetWordsMapThenGetWordsMapThrowsInvalidDataException(WordSearchPuzzle puzzle)
        {
            sut = new WordsLocationFinder(puzzle);

            Assert.Throws <InvalidDataException>(new TestDelegate(GetWordsMapInvalidPuzzle));
        }
        public void GivenValidPuzzleWhenCallingGetWordsMapThenGetWordsMapDoesNotReturnNull(WordSearchPuzzle puzzle)
        {
            sut = new WordsLocationFinder(puzzle);

            sut.GetWordsMap();
        }