Example #1
0
        static void Main(string[] args)
        {
            IConsoleWrapper           consoleWrapper           = new ConsoleWrapper();
            IFileOperations           fileOperations           = new FileOperations();
            IWordFinder               wordFinder               = new WordFinder();
            ISearchOrientationManager searchOrientationManager = new SearchOrientationManager();

            var wordSearchProgram = new WordSearchProgram(consoleWrapper, fileOperations, wordFinder, searchOrientationManager);

            wordSearchProgram.ProgramLoop("puzzles");
        }
        public void GetSearchOrientations_ReturnsListOfISearchOrientations()
        {
            //arrange
            IGridManager gridManager = new GridManager(_testUtilities.StringToGrid("ABC|DEF|GHI"));
            ISearchOrientationManager searchOrientationManager = new SearchOrientationManager();

            //act
            var searchOrientations = searchOrientationManager.GetSearchOrientations(gridManager);

            //assert
            Assert.True(searchOrientations is List <ISearchOrientation>);
            Assert.True(searchOrientations.Count == 4);
        }