Browse Source

Begin general tests

pull/232/head
James Jackson-South 9 years ago
parent
commit
d678eb3fd9
  1. 22
      tests/ImageSharp.Tests/Formats/GeneralFormatTests.cs

22
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<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
string path = this.CreateOutputDirectory("Resolution");
foreach (TestFile file in Files)
using (Image<TPixel> image = provider.GetImage())
{
using (Image<Rgba32> 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);
}
}

Loading…
Cancel
Save