示例#1
0
                public void ThenShouldConvertTo4PointsGivenRectangle(int x, int y, int width, int height)
                {
                    // Arrange
                    var rectangle = new Rectangle(x, y, width, height);

                    // Act
                    var points = ImageMaths.ToPoints(rectangle);

                    // Assert
                    var collectionEquivalentConstraint = Is.EquivalentTo(
                        new[]
                    {
                        new Point(x, y), new Point(x + width, y), new Point(x, y + height),
                        new Point(x + width, y + height),
                    });

                    Assert.That(
                        points,
                        collectionEquivalentConstraint);
                }