private void Run(IArgumentsValues arguments) { IInputFactory inputRunner = new InputFactory(arguments.InputFile) .WithFileSystem(_fileSystem) .WithConsoleService(_consoleService); var inputContent = inputRunner.InputReader().Read(); var dictionaryRunner = new InputFactory(arguments.DictionaryFile) .WithFileSystem(_fileSystem) .WithConsoleService(_consoleService); var dicitonaryInput = dictionaryRunner.InputReader().Read(); //var processor = new Processor(inputContent, dicitonaryInput); //var result = processor.Process(); //Display(result); display or save the result in some file }
public void InputFactoryreturnsFileInputReaderIfFilePresent() { var inputFactory = new InputFactory(new FileInfo("file")); var inputReader = inputFactory.InputReader(); Assert.AreEqual(typeof(FileInputReader), inputReader.GetType(), "Console input reader"); }
public void InputFactoryreturnsConsoleInputReaderIfFileAbsent() { var inputFactory = new InputFactory(null); var inputReader = inputFactory.InputReader(); Assert.AreEqual(typeof(ConsoleInputReader), inputReader.GetType(), "Console input reader"); }