public void GetAllPossiblePosition_ShouldReturnPositionThatHaveCornerInLocation(int x, int y, int width, int height) { RectanglesHelper.GetAllPossibleRectangles(new Point(x, y), new Size(width, height)) .Should().Contain(new Rectangle(x, y, width, height)) .And.Contain(new Rectangle(x - width, y, width, height)) .And.Contain(new Rectangle(x, y - height, width, height)) .And.Contain(new Rectangle(x - width, y - height, width, height)); }
public void GetAllPossiblePosition_ShouldReturnFourDifferentPosition(int x, int y, int width, int height) { RectanglesHelper.GetAllPossibleRectangles(new Point(x, y), new Size(width, height)).Should() .HaveCount(4).And.OnlyHaveUniqueItems(); }