Exemple #1
0
 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);
 }
Exemple #2
0
 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();
 }
Exemple #3
0
        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.");
        }