public void ProcessFileReturnsWordCount()
        {
            IFileProcessor processor = new FileProcessor("fileinput.txt");

            var output = processor.GetWordCount();

            Assert.AreEqual("Alice", output.FirstOrDefault(a => a.Key == "Alice").Key);
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            IFileProcessor fileProcessor = new FileProcessor("fileinput.txt");

            var wordCount = fileProcessor.GetWordCount();

            Console.WriteLine("Word             Count");

            foreach (var word in wordCount)
            {
                Console.WriteLine($"{word.Key}              {word.Value}");
            }

            //fileProcessor = new FileProcessor("ConcateWords.txt");
            Console.WriteLine();
            Console.WriteLine("================= Concatenated words ===============");
            Console.WriteLine();

            Console.WriteLine(fileProcessor.GetConcatenatedWords());

            Console.ReadLine();
        }
 public void FileProcessorMustBeConstructedWithValidFileName()
 {
     IFileProcessor processor = new FileProcessor("");
     processor.GetWordCount();
 }