예제 #1
0
        public void DownScaleToWidthSmaller()
        {
            //arrange
            Image imageInput = new Bitmap(100, 100);

            //act
            Image imageOutput = imageInput.DownScaleTo(60, 100);

            //assert
            Assert.AreEqual(imageOutput.Width, 60);
            Assert.AreEqual(imageOutput.Height, 60);
        }
예제 #2
0
        public void DownScaleToBigger()
        {
            //arrange
            Image imageInput = new Bitmap(100, 100);

            //act
            Image imageOutput = imageInput.DownScaleTo(200, 200);

            //assert
            Assert.AreEqual(imageOutput.Width, 100);
            Assert.AreEqual(imageOutput.Height, 100);
        }
예제 #3
0
        public void DownScaleToEqualAspectRatio()
        {
            //arrange
            Image imageInput = new Bitmap(100, 100);

            //act
            Image imageOutput = imageInput.DownScaleTo(50, 50);

            //assert
            Assert.AreEqual(imageOutput.Width, 50);
            Assert.AreEqual(imageOutput.Height, 50);
        }