コード例 #1
0
        private ReadWriteFile MakeParser()
        {
            string         path          = "mypath.csv";
            IFileProcessor fileProcessor = new ProcessorStub(path);
            ReadWriteFile  readWriteFile = new ReadWriteFile(fileProcessor);

            return(readWriteFile);
        }
コード例 #2
0
        public void GetRecords_WhenCalled_Returns_ListOfPerson()
        {
            //Arrange
            string         path = "mydata.csv";
            IFileProcessor fp   = new ProcessorStub(path);

            //Act
            List <Person> items    = fp.GetRecords();
            List <Person> expected = new List <Person>();

            //Assert
            Assert.AreEqual(expected, items);
        }