public void GetOptimalSizeForImage_ShouldReturnCorrectSize() { var size = new Size(3, 3); var rectangles = new List <Rectangle> { new Rectangle(new Point(-5, -5), size), new Rectangle(new Point(0, 0), size) }; var optimalImageSize = TransformerСalculations.GetOptimalSizeForImage(rectangles, 5); optimalImageSize.Should().Be(new Size(20, 20)); }
public Result <Size> CalculateImageSize(ICollection <Rectangle> rectangles) { return(TransformerСalculations.GetOptimalSizeForImage(rectangles, 0)); }