예제 #1
0
            public void CorrectlyPlacesImageWhenBoxPadding(
                int width,
                int height,
                int destinationLeft,
                int destinationTop)

            {
                const int      NewWidth  = 100;
                const int      NewHeight = 100;
                StubbedResizer resizer   = new StubbedResizer(new ResizeLayer(new Size(NewWidth, NewHeight), ResizeMode.BoxPad));

                resizer.ResizeImage(new Bitmap(width, height), false);

                resizer.ResizeDestination.Top.Should().Be(destinationTop);
                resizer.ResizeDestination.Left.Should().Be(destinationLeft);
            }
예제 #2
0
            public void CorrectlyPlacesImageWhenBoxPadding(
                int width,
                int height,
                int destinationLeft,
                int destinationTop)

            {
                const int NewWidth = 100;
                const int NewHeight = 100;
                StubbedResizer resizer = new StubbedResizer(new ResizeLayer(new Size(NewWidth, NewHeight), ResizeMode.BoxPad));
                resizer.ResizeImage(new Bitmap(width, height), false);

                resizer.ResizeDestination.Top.Should().Be(destinationTop);
                resizer.ResizeDestination.Left.Should().Be(destinationLeft);
            }