Exemple #1
0
        public static void Main()
        {
            IReader consoleDataReader = new ConsoleReader();
            var     rows = consoleDataReader.ReadAllLines();

            IDataExtractor <Material> materialDataExtractor = new MaterialDataExtractor();
            var materialDataProcessor = new MaterialDataProcessor(materialDataExtractor);
            var processedRows         = materialDataProcessor.Process(rows);

            IPresentable standardConsoleOutput = new StandardConsoleOutput();

            standardConsoleOutput.Display(processedRows);
        }
        public void Test_CheckNumberOfReadRowsForEmptyFile()
        {
            //Arrange
            IReader       consoleReader = new ConsoleReader();
            List <string> result;

            //Act
            using (var sr = new StringReader(String.Empty))
            {
                Console.SetIn(sr);
                result = consoleReader.ReadAllLines();
            }

            //Asset
            Assert.AreEqual(0, result.Count);
        }