public void RemoveAt_WhenIndexIsOutOfRange_ShouldThrowIndexOutOfRangeException() { var matrix = new Matrix <int>(4, 4); var collection = new RowCollection <int>(matrix); Assert.Throws <IndexOutOfRangeException>(() => collection.RemoveAt(4)); Assert.Throws <IndexOutOfRangeException>(() => collection.RemoveAt(-1)); }
public void RemoveAt_WhenIndexIsValid_ShouldRemoveRow() { var matrix = new Matrix <int>(4, 4); var collection = new RowCollection <int>(matrix); collection.RemoveAt(0); Assert.Equal(3, collection.Count); Assert.Equal(3, collection.LongCount); }