|
|
|
@ -133,26 +133,13 @@ namespace ImageSharp.Tests |
|
|
|
{ |
|
|
|
TestFormat format = new TestFormat(); |
|
|
|
|
|
|
|
var exception = Assert.Throws<ArgumentException>(() => |
|
|
|
{ |
|
|
|
Bootstrapper.Default.AddImageFormat(format); |
|
|
|
}); |
|
|
|
Assert.Contains("format with the same", exception.Message); |
|
|
|
|
|
|
|
format.Extension = "test"; |
|
|
|
exception = Assert.Throws<ArgumentException>(() => |
|
|
|
{ |
|
|
|
Bootstrapper.Default.AddImageFormat(format); |
|
|
|
}); |
|
|
|
var exception = Assert.Throws<ArgumentException>(() => |
|
|
|
{ |
|
|
|
Bootstrapper.Default.AddImageFormat(format); |
|
|
|
}); |
|
|
|
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", "" }; |
|
|
|
exception = Assert.Throws<ArgumentException>(() => |
|
|
|
{ |
|
|
|
|