Exemplo n.º 1
0
        public void ShowIfIntersects(int left, int top, int width, int height, bool expectedResult)
        {
            var cloud = new Cloud();

            cloud.AppendRectangle(new Rectangle(0, 50, 50, 100));
            cloud.AppendRectangle(new Rectangle(150, 50, 100, 100));

            var givenRectangle = new Rectangle(left, top, width, height);

            cloud.IntersectsWith(givenRectangle).Should().Be(expectedResult);
        }
Exemplo n.º 2
0
        public void HaveRectangleAfterAppend()
        {
            var cloud = new Cloud();

            cloud.AppendRectangle(new Rectangle(100, 50, 20, 10));
            cloud.Should().HaveCount(1);
        }