public void insert_throws_if_there_is_already_a_column_with_the_same_name() { var header = new HeaderRecord("Name", "Age", "Gender"); var ex = Assert.Throws <InvalidOperationException>(() => header.Insert(0, "Age")); Assert.Equal("A column named 'Age' appears more than once in the header record.", ex.Message); }
public void insert_updates_indexes_appropriately() { var header = new HeaderRecord("Name", "Age", "Gender"); header.Insert(1, "Address"); Assert.Equal(0, header["Name"]); Assert.Equal(1, header["Address"]); Assert.Equal(2, header["Age"]); Assert.Equal(3, header["Gender"]); }
public void insert_throws_if_there_is_already_a_column_with_the_same_name() { var header = new HeaderRecord("Name", "Age", "Gender"); var ex = Assert.Throws<InvalidOperationException>(() => header.Insert(0, "Age")); Assert.Equal("A column named 'Age' appears more than once in the header record.", ex.Message); }
public void insert_updates_indexes_appropriately() { var header = new HeaderRecord("Name", "Age", "Gender"); header.Insert(1, "Address"); Assert.Equal(0, header["Name"]); Assert.Equal(1, header["Address"]); Assert.Equal(2, header["Age"]); Assert.Equal(3, header["Gender"]); }