Browse Source

Fix bootstrapper test

af/merge-core
James Jackson-South 9 years ago
parent
commit
2fc0d4b0e9
  1. 21
      tests/ImageSharp.Tests/BootstrapperTests.cs

21
tests/ImageSharp.Tests/BootstrapperTests.cs

@ -133,26 +133,13 @@ namespace ImageSharp.Tests
{ {
TestFormat format = new TestFormat(); TestFormat format = new TestFormat();
var exception = Assert.Throws<ArgumentException>(() =>
{
Bootstrapper.Default.AddImageFormat(format);
});
Assert.Contains("format with the same", exception.Message);
format.Extension = "test"; format.Extension = "test";
exception = Assert.Throws<ArgumentException>(() => var exception = Assert.Throws<ArgumentException>(() =>
{ {
Bootstrapper.Default.AddImageFormat(format); Bootstrapper.Default.AddImageFormat(format);
}); });
Assert.Contains("should contain", exception.Message); Assert.Contains("should contain", exception.Message);
format.SupportedExtensions = new string[] { "test", "jpg" };
exception = Assert.Throws<ArgumentException>(() =>
{
Bootstrapper.Default.AddImageFormat(format);
});
Assert.Contains("supports the same", exception.Message);
format.SupportedExtensions = new string[] { "test", "" }; format.SupportedExtensions = new string[] { "test", "" };
exception = Assert.Throws<ArgumentException>(() => exception = Assert.Throws<ArgumentException>(() =>
{ {

Loading…
Cancel
Save