public void insert_throws_if_index_is_invalid() { var record = new ConcreteRecordBase(); Assert.Throws <ArgumentOutOfRangeException>(() => record.Insert(-1, "one")); Assert.Throws <ArgumentOutOfRangeException>(() => record.Insert(10, "one")); }
public void insert_inserts_value_at_specified_index() { var record = new ConcreteRecordBase("two", "four"); record.Insert(1, "three"); record.Insert(0, "one"); Assert.Equal(4, record.Count); Assert.Equal("one", record[0]); Assert.Equal("two", record[1]); Assert.Equal("three", record[2]); Assert.Equal("four", record[3]); }
public void insert_throws_if_value_is_null() { var record = new ConcreteRecordBase(); Assert.Throws <ArgumentNullException>(() => record.Insert(0, null)); }
public void insert_throws_if_read_only() { var record = new ConcreteRecordBase(true); Assert.Throws <NotSupportedException>(() => record.Insert(0, "one")); }
public void insert_throws_if_value_is_null() { var record = new ConcreteRecordBase(); Assert.Throws<ArgumentNullException>(() => record.Insert(0, null)); }
public void insert_throws_if_read_only() { var record = new ConcreteRecordBase(true); Assert.Throws<NotSupportedException>(() => record.Insert(0, "one")); }
public void insert_throws_if_index_is_invalid() { var record = new ConcreteRecordBase(); Assert.Throws<ArgumentOutOfRangeException>(() => record.Insert(-1, "one")); Assert.Throws<ArgumentOutOfRangeException>(() => record.Insert(10, "one")); }