コード例 #1
0
        public void ShouldNotCollideWhenNotOverlapping()
        {
            var circle1 = new TestCircle(10, 10, 5);
            var circle2 = new TestCircle(20, 20, 2);

            circle1.IsCollidingWith(circle2).ShouldBeFalse();
        }
コード例 #2
0
        public void ShouldCollideWhenOverlapping()
        {
            var circle1 = new TestCircle(10, 10, 5);
            var circle2 = new TestCircle(15, 15, 6);

            circle1.IsCollidingWith(circle2).ShouldBeTrue();
        }
コード例 #3
0
        public void ShouldCollideWhenIdentical()
        {
            var circle = new TestCircle(10, 10, 5);

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