Exemplo n.º 1
0
        public void Get_Stream_From_File_And_Then_Resize_It_Should_Success()
        {
            using (Stream inputStream = (Stream)File.OpenRead(_mediaFilePath))
            {
                // Arrange
                var transformationOptions = GetTransformationOptions();
                var imageFormat           = GetImageFormat();

                // Act
                var outputStream = _imageResizer.ResizeImageFromStream(inputStream, transformationOptions, imageFormat);

                // Assert
                System.Diagnostics.Debug.Print($"Stream length {outputStream.Length}");
                Assert.True(outputStream.Length > 0);
            }
        }