Beispiel #1
0
        public void ReturnResizedImage(int width, int height)
        {
            // Assign
            var imageService = new Services.ImageService.ImageService();
            var image        = new Image <Rgba32>(1600, 500);

            // Act
            var resizedImage = imageService.ResizeImage(image, width, height);

            // Assert
            Assert.NotEqual(image, resizedImage);
            Assert.NotEqual(image.Width, resizedImage.Width);
            Assert.NotEqual(image.Height, resizedImage.Height);
            Assert.Equal(resizedImage.Width, width);
            Assert.Equal(resizedImage.Height, height);
        }
Beispiel #2
0
        public void ReturnOriginalImage()
        {
            // Assign
            var width  = 1600;
            var height = 500;

            var imageService = new Services.ImageService.ImageService();
            var image        = new Image <Rgba32>(width, height);

            // Act
            var resizedImage = imageService.ResizeImage(image, width, height);

            // Assert
            Assert.NotEqual(image, resizedImage);
            Assert.Equal(image.Width, resizedImage.Width);
            Assert.Equal(image.Height, resizedImage.Height);
        }