public void GetFomeFileTestBadPath()
        {
            TextDocument expectedResult = null;
            var          testResult     = TextDocument.GetFomeFile("badPath");

            Assert.Equal(expectedResult, testResult);
        }
        private void AddingToIndexRoutine()
        {
            var doNotExit = "";

            do
            {
                var userChoice = "";
                do
                {
                    Console.WriteLine("Write 'f' to add single file, 'd' to add folder of files to index or 's' to skip addeing:");
                    userChoice = Console.ReadLine();
                } while (userChoice != "f" && userChoice != "d" && userChoice != "s");
                if (userChoice == "s")
                {
                    return;
                }
                string path = GetPath(userChoice);
                switch (userChoice)
                {
                case "f": {
                    var item = TextDocument.GetFomeFile(path);
                    index.AddToIndex(item);
                    break;
                }

                case "d": {
                    var items = TextDocument.GetFomeDirectory(path);
                    index.AddToIndex(items);
                    break;
                }
                }
                Console.WriteLine("Do you like to add more data?( y / anything else ):");
                doNotExit = Console.ReadLine();
            } while (doNotExit == "y");
        }
        public void GetFomeFileTest()
        {
            var expectedResult = new TextDocument {
                Path    = directoryPath + "/sample",
                DocText = "this is simple file"
            };
            var testResult = TextDocument.GetFomeFile(directoryPath + "/sample");

            Assert.Equal(expectedResult, testResult);
        }