Ejemplo n.º 1
0
        public void ShouldNotCollideWhenNotOverlapping()
        {
            var circle1 = new TestCircle(10, 10, 5);
            var circle2 = new TestCircle(20, 20, 2);

            circle1.IsCollidingWith(circle2).ShouldBeFalse();
        }
Ejemplo n.º 2
0
        public void ShouldCollideWhenOverlapping()
        {
            var circle1 = new TestCircle(10, 10, 5);
            var circle2 = new TestCircle(15, 15, 6);

            circle1.IsCollidingWith(circle2).ShouldBeTrue();
        }
Ejemplo n.º 3
0
        public void ShouldCollideWhenIdentical()
        {
            var circle = new TestCircle(10, 10, 5);

            circle.IsCollidingWith(circle).ShouldBeTrue();
        }