public void ReturnCropedImage(int width, int height) { // Assign var imageService = new Services.ImageService.ImageService(); var image = new Image <Rgba32>(3200, 1000); // Act var cropedImage = imageService.CropImage(image, width, height); // Assert Assert.NotEqual(image, cropedImage); Assert.NotEqual(image.Width, cropedImage.Width); Assert.Equal(image.Height, cropedImage.Height); Assert.Equal(cropedImage.Width, width); Assert.Equal(cropedImage.Height, height); }
public void ReturnUncropedImage() { // Assign var width = 1600; var height = 500; var imageService = new Services.ImageService.ImageService(); var image = new Image <Rgba32>(width, height); // Act var cropedImage = imageService.CropImage(image, width, height); // Assert Assert.NotEqual(image, cropedImage); Assert.Equal(image.Width, cropedImage.Width); Assert.Equal(image.Height, cropedImage.Height); }