Ejemplo n.º 1
0
        public void GetObjectsOverlapping_ReturnsCorrectObject()
        {
            var grid = new UniversalGrid <string>(10, 20);

            var thing1 = "A".AsSpatialObject(1, 1);
            var thing2 = "B".AsSpatialObject(1, 2);

            grid.SetObjects(thing1, thing2);

            var objs = grid.GetObjectsOverlapping(new Point2D()
            {
                X = 1, Y = 2
            }).ToList();

            Assert.That(objs.Single(), Is.EqualTo(thing2));
        }