BloomTests.RuntimeImageProcessing.RuntimeImageProcessingTests.GetJPG_ReturnsShrunkJPG C# (CSharp) Method

GetJPG_ReturnsShrunkJPG() private method

private GetJPG_ReturnsShrunkJPG ( ) : void
return void
        public void GetJPG_ReturnsShrunkJPG()
        {
            using (var cache = new RuntimeImageProcessor(new BookRenamedEvent()) { TargetDimension = 100 })
            using (var file = MakeTempJPGImage(200, 80))
            {
                var pathToResizedImage = cache.GetPathToResizedImage(file.Path);
                using (var img = ImageUtils.GetImageFromFile(pathToResizedImage))
                {
                    Assert.AreEqual(".jpg", Path.GetExtension(pathToResizedImage));

                    //TODO: why does this always report PNG format? Checks by hand of the file show it as jpg
                    //Assert.AreEqual(ImageFormat.Jpeg.Guid, img.RawFormat.Guid);

                    Assert.AreEqual(100, img.Width);
                    Assert.AreEqual(40, img.Height);
                }
            }
        }