public void CsvTable_AddHeader_ByName_NullHeader() { var table = new CsvTable(); string headerName = null; Assert.Throws <ArgumentNullException>(() => table.AddHeader(headerName)); }
public void CsvTable_HasColumn_NullArgument() { var table = new CsvTable(); string headerName = "test"; table.AddHeader(headerName); Assert.False(table.HasColumn(null)); }
public void CsvTable_HasColumn_Success() { var table = new CsvTable(); string headerName = "test"; table.AddHeader(headerName); Assert.True(table.HasColumn(headerName)); }
public void CsvTable_HasColumn_HeaderDoesNotExist() { var table = new CsvTable(); string headerName = "test"; string nonExistingheaderName = "iDontExist"; table.AddHeader(headerName); Assert.False(table.HasColumn(nonExistingheaderName)); }
public void CsvTable_GetHeader_ByIndex_Success() { var table = new CsvTable(); string headerName = "test"; table.AddHeader(headerName); CsvHeader returnedHeader = table.GetHeader(0); Assert.Equal(headerName, returnedHeader.Name); Assert.Equal(0, returnedHeader.Index); }