Пример #1
0
        public void Add_AddsWayToCollection()
        {
            OsmDatabase<IOsmGeometry, Node, Way, Relation> target = new OsmDatabase<IOsmGeometry, Node, Way, Relation>(_wayData.Skip(1));
            target.Add(_wayData[0]);

            Assert.Contains(_wayData[0], target);
        }
Пример #2
0
        public void Add_AddsRelationToCollection()
        {
            OsmDatabase <IOsmGeometry, Node, Way, Relation> target = new OsmDatabase <IOsmGeometry, Node, Way, Relation>(_relationData.Skip(1));

            target.Add(_relationData[0]);

            Assert.Contains(_relationData[0], target);
        }
Пример #3
0
        public void Add_ThrowsExceptionWhenAddingDuplicateID()
        {
            OsmDatabase <IOsmGeometry, Node, Way, Relation> target = new OsmDatabase <IOsmGeometry, Node, Way, Relation>(_data);

            Assert.Throws <ArgumentException>(() => target.Add(_data[0]));
        }
Пример #4
0
        public void Add_ThrowsArgumentNullExceptionIfItemIsNull()
        {
            OsmDatabase <IOsmGeometry, Node, Way, Relation> target = new OsmDatabase <IOsmGeometry, Node, Way, Relation>();

            Assert.Throws <ArgumentNullException>(() => target.Add(null));
        }
Пример #5
0
        public void Add_ThrowsExceptionWhenAddingDuplicateID()
        {
            OsmDatabase<IOsmGeometry, Node, Way, Relation> target = new OsmDatabase<IOsmGeometry, Node, Way, Relation>(_data);

            Assert.Throws<ArgumentException>(() => target.Add(_data[0]));
        }
Пример #6
0
        public void Add_ThrowsArgumentNullExceptionIfItemIsNull()
        {
            OsmDatabase<IOsmGeometry, Node, Way, Relation> target = new OsmDatabase<IOsmGeometry, Node, Way, Relation>();

            Assert.Throws<ArgumentNullException>(() => target.Add(null));
        }