Пример #1
0
        public void CannotMoveRemovedElement()
        {
            ConcurrentGeoQuadtree <object> quadtree = new ConcurrentGeoQuadtree <object>();

            var element = quadtree.InsertElement(null, new GeoCoordinates(0, 0));

            quadtree.RemoveElement(element);

            Assert.False(quadtree.MoveElement(element, new GeoCoordinates(1, 1)));
        }
Пример #2
0
        public void MovingElementChangesPosition()
        {
            ConcurrentGeoQuadtree <object> quadtree = new ConcurrentGeoQuadtree <object>();

            var element = quadtree.InsertElement(null, new GeoCoordinates(0, 0));

            Assert.True(element.Coordinates.Equals(new GeoCoordinates(0, 0)));

            Assert.True(quadtree.MoveElement(element, new GeoCoordinates(1, 1)));

            Assert.True(element.Coordinates.Equals(new GeoCoordinates(1, 1)));
        }