private bool AssertIsAsExpected(Rectangle.Impl.Rectangle expected, Rectangle.Impl.Rectangle actual) { if (expected.X == actual.X && expected.Y == actual.Y && expected.Width == actual.Width && expected.Height == actual.Height) { return(true); } return(false); }
public static void DisplayRectangleData(Rectangle.Impl.Rectangle rectangle) { System.Console.WriteLine("Main Point of Rectangle: ({0}, {1}). Width = {2, 3}, Height = {3, 3}", rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height); System.Console.WriteLine(); }
public void FindRectangle_GetPointsFindRectangle_NewRectangle(List <Point> points, Rectangle.Impl.Rectangle expectedResult) { // Act var actualResult = Service.FindRectangle(points); // Assert Assert.True(AssertIsAsExpected(expectedResult, actualResult), "FindRectangle method works incorrectly. Result is not as expected."); }