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]);
               }
        }
Esempio n. 2
0
        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]);
            }
        }
Esempio n. 3
0
        public void Insert_Index_Coordinate_ThowsNotSupportedException()
        {
            ReadOnlyCoordinateList <Point> target = new ReadOnlyCoordinateList <Point>(_points);

            Assert.Throws <NotSupportedException>(() => target.Insert(0, Coordinate.Empty));
        }
Esempio n. 4
0
        public void Add_Coordinates_ThowsNotSupportedException()
        {
            ReadOnlyCoordinateList <Point> target = new ReadOnlyCoordinateList <Point>(_points);

            Assert.Throws <NotSupportedException>(() => target.Add(new Coordinate[] { Coordinate.Empty }));
        }
Esempio n. 5
0
        public void Count_GetsNumberOfItemsInSourceCollection()
        {
            ReadOnlyCoordinateList <Point> target = new ReadOnlyCoordinateList <Point>(_points);

            Assert.Equal(_points.Count, target.Count);
        }
Esempio n. 6
0
        public void Indexer_Set_ThrowsNotSupportedException()
        {
            ReadOnlyCoordinateList <Point> target = new ReadOnlyCoordinateList <Point>(_points);

            Assert.Throws <NotSupportedException>(() => target[0] = new Coordinate(10.1, 11.2));
        }
Esempio n. 7
0
        public void Constructor_Source_SetsSource()
        {
            ReadOnlyCoordinateList <Point> target = new ReadOnlyCoordinateList <Point>(_points);

            Assert.Same(_points, target.Source);
        }
Esempio n. 8
0
        public void Clear_ThowsNotSupportedException()
        {
            ReadOnlyCoordinateList <Point> target = new ReadOnlyCoordinateList <Point>(_points);

            Assert.Throws <NotSupportedException>(() => target.Clear());
        }
Esempio n. 9
0
        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 }));
        }