Esempio n. 1
0
        public void NursesFileReader_ReadCsv_WhenRowsContainValidData_CreatesNursesFromCSVRows()
        {
            var csvLines = new List <string> {
                _headerRow,
                $"{_nurse1Name},{_nurse1Uid}",
                $"{_nurse2Name},{_nurse2Uid}"
            };

            var mockNursesFile = _createMockNursesFile(csvLines);
            var nurses         = NursesFileReader.readCSV(mockNursesFile);

            Assert.Equal(nurses, new List <Nurse> {
                new Nurse {
                    uid = _nurse1Name, name = _nurse1Uid
                },
                new Nurse {
                    uid = _nurse2Name, name = _nurse2Uid
                }
            });
        }