public void AssertThat_GetCorners_Throws_WhenPresentedAnArrayWhichIsTooSmall() { var rect = new BoundingRectangle(new Vector2(0, 0), new Vector2(10, 10)); Vector2[] arr = new Vector2[2]; rect.GetCorners(arr); }
public void AssertThat_GetCorners_GetsCorners() { var rect = new BoundingRectangle(new Vector2(0, 0), new Vector2(10, 10)); var corners = rect.GetCorners(); Assert.AreEqual(4, corners.Length); Assert.IsTrue(corners.Contains(new Vector2(0, 0))); Assert.IsTrue(corners.Contains(new Vector2(0, 10))); Assert.IsTrue(corners.Contains(new Vector2(10, 0))); Assert.IsTrue(corners.Contains(new Vector2(10, 10))); }