Esempio n. 1
0
        public async Task DecodeAsnc_DegenerateMemoryRequest_ShouldTranslateTo_ImageFormatException <TPixel>(TestImageProvider <TPixel> provider)
            where TPixel : unmanaged, IPixel <TPixel>
        {
            provider.LimitAllocatorBufferCapacity().InBytesSqrt(10);
            InvalidImageContentException ex = await Assert.ThrowsAsync <InvalidImageContentException>(() => provider.GetImageAsync(JpegDecoder));

            this.Output.WriteLine(ex.Message);
            Assert.IsType <InvalidMemoryOperationException>(ex.InnerException);
        }