|
|
@ -39,7 +39,6 @@ namespace SixLabors.ImageSharp.Tests |
|
|
[Fact] |
|
|
[Fact] |
|
|
public void AddNewFrame_Frame_FramesNotBeNull() |
|
|
public void AddNewFrame_Frame_FramesNotBeNull() |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
ArgumentNullException ex = Assert.Throws<ArgumentNullException>(() => |
|
|
ArgumentNullException ex = Assert.Throws<ArgumentNullException>(() => |
|
|
{ |
|
|
{ |
|
|
this.collection.AddFrame((ImageFrame<Rgba32>)null); |
|
|
this.collection.AddFrame((ImageFrame<Rgba32>)null); |
|
|
@ -49,12 +48,13 @@ namespace SixLabors.ImageSharp.Tests |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
[Fact] |
|
|
[Fact] |
|
|
public void AddNewFrame_PixelBuffer_FramesNotBeNull() |
|
|
public void AddNewFrame_PixelBuffer_DataMustNotBeNull() |
|
|
{ |
|
|
{ |
|
|
|
|
|
Rgba32[] data = null; |
|
|
|
|
|
|
|
|
ArgumentNullException ex = Assert.Throws<ArgumentNullException>(() => |
|
|
ArgumentNullException ex = Assert.Throws<ArgumentNullException>(() => |
|
|
{ |
|
|
{ |
|
|
this.collection.AddFrame((Rgba32[])null); |
|
|
this.collection.AddFrame(data); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
Assert.StartsWith("Value cannot be null.", ex.Message); |
|
|
Assert.StartsWith("Value cannot be null.", ex.Message); |
|
|
@ -63,7 +63,6 @@ namespace SixLabors.ImageSharp.Tests |
|
|
[Fact] |
|
|
[Fact] |
|
|
public void AddNewFrame_PixelBuffer_BufferIncorrectSize() |
|
|
public void AddNewFrame_PixelBuffer_BufferIncorrectSize() |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
ArgumentOutOfRangeException ex = Assert.Throws<ArgumentOutOfRangeException>(() => |
|
|
ArgumentOutOfRangeException ex = Assert.Throws<ArgumentOutOfRangeException>(() => |
|
|
{ |
|
|
{ |
|
|
this.collection.AddFrame(new Rgba32[0]); |
|
|
this.collection.AddFrame(new Rgba32[0]); |
|
|
@ -75,7 +74,6 @@ namespace SixLabors.ImageSharp.Tests |
|
|
[Fact] |
|
|
[Fact] |
|
|
public void InsertNewFrame_FramesMustHaveSameSize() |
|
|
public void InsertNewFrame_FramesMustHaveSameSize() |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
ArgumentException ex = Assert.Throws<ArgumentException>(() => |
|
|
ArgumentException ex = Assert.Throws<ArgumentException>(() => |
|
|
{ |
|
|
{ |
|
|
this.collection.InsertFrame(1, new ImageFrame<Rgba32>(Configuration.Default.MemoryManager, 1, 1)); |
|
|
this.collection.InsertFrame(1, new ImageFrame<Rgba32>(Configuration.Default.MemoryManager, 1, 1)); |
|
|
@ -87,7 +85,6 @@ namespace SixLabors.ImageSharp.Tests |
|
|
[Fact] |
|
|
[Fact] |
|
|
public void InsertNewFrame_FramesNotBeNull() |
|
|
public void InsertNewFrame_FramesNotBeNull() |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
ArgumentNullException ex = Assert.Throws<ArgumentNullException>(() => |
|
|
ArgumentNullException ex = Assert.Throws<ArgumentNullException>(() => |
|
|
{ |
|
|
{ |
|
|
this.collection.InsertFrame(1, null); |
|
|
this.collection.InsertFrame(1, null); |
|
|
@ -99,7 +96,6 @@ namespace SixLabors.ImageSharp.Tests |
|
|
[Fact] |
|
|
[Fact] |
|
|
public void Constructor_FramesMustHaveSameSize() |
|
|
public void Constructor_FramesMustHaveSameSize() |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
ArgumentException ex = Assert.Throws<ArgumentException>(() => |
|
|
ArgumentException ex = Assert.Throws<ArgumentException>(() => |
|
|
{ |
|
|
{ |
|
|
var collection = new ImageFrameCollection<Rgba32>(this.image, new[] { |
|
|
var collection = new ImageFrameCollection<Rgba32>(this.image, new[] { |
|
|
|