|
|
|
@ -48,7 +48,7 @@ namespace ImageSharp.Tests |
|
|
|
|
|
|
|
exception = Assert.Throws<ArgumentNullException>(() => |
|
|
|
{ |
|
|
|
Bootstrapper.Instance.AddImageFormat(null); |
|
|
|
Bootstrapper.AddImageFormat(null); |
|
|
|
}); |
|
|
|
|
|
|
|
var format = new TestFormat(); |
|
|
|
@ -56,7 +56,7 @@ namespace ImageSharp.Tests |
|
|
|
|
|
|
|
exception = Assert.Throws<ArgumentNullException>(() => |
|
|
|
{ |
|
|
|
Bootstrapper.Instance.AddImageFormat(format); |
|
|
|
Bootstrapper.AddImageFormat(format); |
|
|
|
}); |
|
|
|
Assert.Contains("decoder", exception.Message); |
|
|
|
|
|
|
|
@ -65,7 +65,7 @@ namespace ImageSharp.Tests |
|
|
|
|
|
|
|
exception = Assert.Throws<ArgumentNullException>(() => |
|
|
|
{ |
|
|
|
Bootstrapper.Instance.AddImageFormat(format); |
|
|
|
Bootstrapper.AddImageFormat(format); |
|
|
|
}); |
|
|
|
Assert.Contains("encoder", exception.Message); |
|
|
|
|
|
|
|
@ -74,7 +74,7 @@ namespace ImageSharp.Tests |
|
|
|
|
|
|
|
exception = Assert.Throws<ArgumentNullException>(() => |
|
|
|
{ |
|
|
|
Bootstrapper.Instance.AddImageFormat(format); |
|
|
|
Bootstrapper.AddImageFormat(format); |
|
|
|
}); |
|
|
|
Assert.Contains("mime type", exception.Message); |
|
|
|
|
|
|
|
@ -83,7 +83,7 @@ namespace ImageSharp.Tests |
|
|
|
|
|
|
|
exception = Assert.Throws<ArgumentException>(() => |
|
|
|
{ |
|
|
|
Bootstrapper.Instance.AddImageFormat(format); |
|
|
|
Bootstrapper.AddImageFormat(format); |
|
|
|
}); |
|
|
|
Assert.Contains("mime type", exception.Message); |
|
|
|
|
|
|
|
@ -92,7 +92,7 @@ namespace ImageSharp.Tests |
|
|
|
|
|
|
|
exception = Assert.Throws<ArgumentNullException>(() => |
|
|
|
{ |
|
|
|
Bootstrapper.Instance.AddImageFormat(format); |
|
|
|
Bootstrapper.AddImageFormat(format); |
|
|
|
}); |
|
|
|
Assert.Contains("extension", exception.Message); |
|
|
|
|
|
|
|
@ -101,7 +101,7 @@ namespace ImageSharp.Tests |
|
|
|
|
|
|
|
exception = Assert.Throws<ArgumentException>(() => |
|
|
|
{ |
|
|
|
Bootstrapper.Instance.AddImageFormat(format); |
|
|
|
Bootstrapper.AddImageFormat(format); |
|
|
|
}); |
|
|
|
Assert.Contains("extension", exception.Message); |
|
|
|
|
|
|
|
@ -110,7 +110,7 @@ namespace ImageSharp.Tests |
|
|
|
|
|
|
|
exception = Assert.Throws<ArgumentNullException>(() => |
|
|
|
{ |
|
|
|
Bootstrapper.Instance.AddImageFormat(format); |
|
|
|
Bootstrapper.AddImageFormat(format); |
|
|
|
}); |
|
|
|
Assert.Contains("supported extensions", exception.Message); |
|
|
|
|
|
|
|
@ -119,7 +119,7 @@ namespace ImageSharp.Tests |
|
|
|
|
|
|
|
exception = Assert.Throws<ArgumentException>(() => |
|
|
|
{ |
|
|
|
Bootstrapper.Instance.AddImageFormat(format); |
|
|
|
Bootstrapper.AddImageFormat(format); |
|
|
|
}); |
|
|
|
Assert.Contains("supported extensions", exception.Message); |
|
|
|
} |
|
|
|
@ -131,28 +131,28 @@ namespace ImageSharp.Tests |
|
|
|
|
|
|
|
var exception = Assert.Throws<ArgumentException>(() => |
|
|
|
{ |
|
|
|
Bootstrapper.Instance.AddImageFormat(format); |
|
|
|
Bootstrapper.AddImageFormat(format); |
|
|
|
}); |
|
|
|
Assert.Contains("format with the same", exception.Message); |
|
|
|
|
|
|
|
format.Extension = "test"; |
|
|
|
exception = Assert.Throws<ArgumentException>(() => |
|
|
|
{ |
|
|
|
Bootstrapper.Instance.AddImageFormat(format); |
|
|
|
Bootstrapper.AddImageFormat(format); |
|
|
|
}); |
|
|
|
Assert.Contains("should contain", exception.Message); |
|
|
|
|
|
|
|
format.SupportedExtensions = new string[] { "test", "jpg" }; |
|
|
|
exception = Assert.Throws<ArgumentException>(() => |
|
|
|
{ |
|
|
|
Bootstrapper.Instance.AddImageFormat(format); |
|
|
|
Bootstrapper.AddImageFormat(format); |
|
|
|
}); |
|
|
|
Assert.Contains("supports the same", exception.Message); |
|
|
|
|
|
|
|
format.SupportedExtensions = new string[] { "test", "" }; |
|
|
|
exception = Assert.Throws<ArgumentException>(() => |
|
|
|
{ |
|
|
|
Bootstrapper.Instance.AddImageFormat(format); |
|
|
|
Bootstrapper.AddImageFormat(format); |
|
|
|
}); |
|
|
|
Assert.Contains("empty values", exception.Message); |
|
|
|
} |
|
|
|
|