public void ReadingTheHeaderOfTheCSV_IfNoHeader_ReturnsNull() { var csvReader = new Obfuscator.Domain.CsvFile(); csvReader.CsvLines = null; csvReader.HasHeaders = false; var headers = csvReader.GetHeaders(); Assert.IsNull(headers); }
public void ReadingTheHeaderOfTheCSV_ReturnsTheDataFromTheFirstLine() { var expectedHeaders = _csvHeadersLine.Split(new char[] { ',' }).ToList(); var csvReader = new Obfuscator.Domain.CsvFile(); csvReader.CsvLines = _csvContent; csvReader.HasHeaders = true; var headers = csvReader.GetHeaders(); Assert.IsTrue(expectedHeaders.SequenceEqual(headers)); }