Skip to content

Commit

Permalink
Added extra unit tests to check the number of readable and writable f…
Browse files Browse the repository at this point in the history
…ormats.
  • Loading branch information
dlemstra committed Sep 15, 2023
1 parent 96c1434 commit 84bd356
Showing 1 changed file with 27 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,38 @@ public void ShouldContainNoFormatInformationWithMagickFormatSetToUnknown()
[Fact]
public void ShouldContainTheCorrectNumberOfFormats()
{
var formatsCount = MagickNET.SupportedFormats.Count();
var formatsCount = MagickNET.SupportedFormats.Count;

if (Runtime.IsWindows)
Assert.Equal(268, formatsCount);
else
Assert.Equal(265, formatsCount);
}

[Fact]
public void ShouldContainTheCorrectNumberOfReadableFormats()
{
var formatsCount = MagickNET.SupportedFormats
.Where(format => format.SupportsReading)
.Count();

if (Runtime.IsWindows)
Assert.Equal(246, formatsCount);
else
Assert.Equal(242, formatsCount);
}

[Fact]
public void ShouldContainTheCorrectNumberOfWritableFormats()
{
var formatsCount = MagickNET.SupportedFormats
.Where(format => format.SupportsWriting)
.Count();

if (Runtime.IsWindows)
Assert.Equal(191, formatsCount);
else
Assert.Equal(190, formatsCount);
}
}
}

0 comments on commit 84bd356

Please sign in to comment.