Esempio n. 1
0
        public void Should_GetScreens_When_AElementIsInScreenLast()
        {
            var element = new Element(50, 50);

            var mosaic = new Mosaic();

            var screen1 = new Screen(200, 200);
            var screen2 = new Screen(100, 300);
            var screen3 = new Screen(200, 200);

            mosaic.AddNeighbor(screen1);
            mosaic.AddNeighbor(screen1, screen2, DirectionEnum.Right);
            mosaic.AddNeighbor(screen2, screen3, DirectionEnum.Right);

            element.Move(350, 150);

            var result = mosaic.IsIn(element);

            Assert.NotNull(mosaic);
            Assert.Single(result);
            Assert.Equal <Guid>(screen3.Id, result[0].Id);
        }