コード例 #1
0
        public void ShouldReturnAListContainTheSameNumberOfElementAsTheNumberOfRows()
        {
            string filePath  = "/Users/Joyce.Yeung/Projects/ToyBlockFactory/ToyBlockFactory/Sample/sample_input.csv";
            var    processor = new CSVInputReader(filePath);
            var    result    = processor.GetInput();

            Assert.Equal(3, result.Count);
        }
コード例 #2
0
        public void ShouldThrowExceptionWhenFileDoesntExist()
        {
            string filePath  = "/Users/Joyce.Yeung/Projects/ToyBlockFactory/ToyBlockFactory/NotExist/nofile.csv";
            var    processor = new CSVInputReader(filePath);
            Action act       = () => processor.GetInput();

            Assert.Throws <FileNotFoundException>(act);
        }