diff --git a/tests/ImageSharp.Tests/Formats/GeneralFormatTests.cs b/tests/ImageSharp.Tests/Formats/GeneralFormatTests.cs index b47df8395..411cc600a 100644 --- a/tests/ImageSharp.Tests/Formats/GeneralFormatTests.cs +++ b/tests/ImageSharp.Tests/Formats/GeneralFormatTests.cs @@ -13,22 +13,16 @@ namespace ImageSharp.Tests public class GeneralFormatTests : FileTestBase { - [Fact] - public void ResolutionShouldChange() + [Theory] + [WithFileCollection(nameof(DefaultFiles), StandardPixelType)] + public void ResolutionShouldChange(TestImageProvider provider) + where TPixel : struct, IPixel { - string path = this.CreateOutputDirectory("Resolution"); - - foreach (TestFile file in Files) + using (Image image = provider.GetImage()) { - using (Image image = file.CreateImage()) - { - using (FileStream output = File.OpenWrite($"{path}/{file.FileName}")) - { - image.MetaData.VerticalResolution = 150; - image.MetaData.HorizontalResolution = 150; - image.Save(output); - } - } + image.MetaData.VerticalResolution = 150; + image.MetaData.HorizontalResolution = 150; + image.DebugSave(provider, null, Extensions.Bmp); } }