public void Indexer_Get_ReturnsCoordinatesFromSourceList() { ReadOnlyCoordinateList<Point> target = new ReadOnlyCoordinateList<Point>(_points); for (int i = 0; i < _points.Count; i++) { Assert.Equal(_points[i].Position, target[i]); } }
public void Indexer_Get_ReturnsCoordinatesFromSourceList() { ReadOnlyCoordinateList <Point> target = new ReadOnlyCoordinateList <Point>(_points); for (int i = 0; i < _points.Count; i++) { Assert.Equal(_points[i].Position, target[i]); } }
public void Insert_Index_Coordinate_ThowsNotSupportedException() { ReadOnlyCoordinateList <Point> target = new ReadOnlyCoordinateList <Point>(_points); Assert.Throws <NotSupportedException>(() => target.Insert(0, Coordinate.Empty)); }
public void Add_Coordinates_ThowsNotSupportedException() { ReadOnlyCoordinateList <Point> target = new ReadOnlyCoordinateList <Point>(_points); Assert.Throws <NotSupportedException>(() => target.Add(new Coordinate[] { Coordinate.Empty })); }
public void Count_GetsNumberOfItemsInSourceCollection() { ReadOnlyCoordinateList <Point> target = new ReadOnlyCoordinateList <Point>(_points); Assert.Equal(_points.Count, target.Count); }
public void Indexer_Set_ThrowsNotSupportedException() { ReadOnlyCoordinateList <Point> target = new ReadOnlyCoordinateList <Point>(_points); Assert.Throws <NotSupportedException>(() => target[0] = new Coordinate(10.1, 11.2)); }
public void Constructor_Source_SetsSource() { ReadOnlyCoordinateList <Point> target = new ReadOnlyCoordinateList <Point>(_points); Assert.Same(_points, target.Source); }
public void Clear_ThowsNotSupportedException() { ReadOnlyCoordinateList <Point> target = new ReadOnlyCoordinateList <Point>(_points); Assert.Throws <NotSupportedException>(() => target.Clear()); }
public void RemoveAt_Index_ThowsNotSupportedException() { ReadOnlyCoordinateList <Point> target = new ReadOnlyCoordinateList <Point>(_points); Assert.Throws <NotSupportedException>(() => target.RemoveAt(0)); }
public void RemoveAt_Index_ThowsNotSupportedException() { ReadOnlyCoordinateList<Point> target = new ReadOnlyCoordinateList<Point>(_points); Assert.Throws<NotSupportedException>(() => target.RemoveAt(0)); }
public void Insert_Index_Coordinate_ThowsNotSupportedException() { ReadOnlyCoordinateList<Point> target = new ReadOnlyCoordinateList<Point>(_points); Assert.Throws<NotSupportedException>(() => target.Insert(0, Coordinate.Empty)); }
public void Indexer_Set_ThrowsNotSupportedException() { ReadOnlyCoordinateList<Point> target = new ReadOnlyCoordinateList<Point>(_points); Assert.Throws<NotSupportedException>(() => target[0] = new Coordinate(10.1, 11.2)); }
public void Count_GetsNumberOfItemsInSourceCollection() { ReadOnlyCoordinateList<Point> target = new ReadOnlyCoordinateList<Point>(_points); Assert.Equal(_points.Count, target.Count); }
public void Constructor_Source_SetsSource() { ReadOnlyCoordinateList<Point> target = new ReadOnlyCoordinateList<Point>(_points); Assert.Same(_points, target.Source); }
public void Clear_ThowsNotSupportedException() { ReadOnlyCoordinateList<Point> target = new ReadOnlyCoordinateList<Point>(_points); Assert.Throws<NotSupportedException>(() => target.Clear()); }
public void Add_Coordinates_ThowsNotSupportedException() { ReadOnlyCoordinateList<Point> target = new ReadOnlyCoordinateList<Point>(_points); Assert.Throws<NotSupportedException>(() => target.Add(new Coordinate[] { Coordinate.Empty })); }