コード例 #1
0
 public void ShouldThrowExceptionWhenArrayIsEmpty()
 {
     Assert.Throws <ArgumentException>("data", () => MagickImageInfo.ReadCollection(new byte[] { }, 0, 0).ToArray());
 }
コード例 #2
0
 public void ShouldThrowExceptionWhenCountIsNegative()
 {
     Assert.Throws <ArgumentException>("count", () => MagickImageInfo.ReadCollection(new byte[] { 215 }, 0, -1).ToArray());
 }
コード例 #3
0
 public void ShouldThrowExceptionWhenStreamIsNull()
 {
     Assert.Throws <ArgumentNullException>("stream", () => MagickImageInfo.ReadCollection((Stream)null).ToArray());
 }
コード例 #4
0
 public void ShouldThrowExceptionWhenArrayIsNull()
 {
     Assert.Throws <ArgumentNullException>("data", () => MagickImageInfo.ReadCollection(null, 0, 0).ToArray());
 }
コード例 #5
0
 public void ShouldThrowExceptionWhenFileNameIsEmpty()
 {
     ExceptionAssert.Throws <ArgumentException>("fileName", () => MagickImageInfo.ReadCollection(string.Empty).ToArray());
 }
コード例 #6
0
                public void ShouldReturnEnumerableWithCorrectCount()
                {
                    var info = MagickImageInfo.ReadCollection(Files.RoseSparkleGIF);

                    Assert.Equal(3, info.Count());
                }
コード例 #7
0
 public void ShouldThrowExceptionWhenFileNameIsNull()
 {
     ExceptionAssert.Throws <ArgumentNullException>("fileName", () => MagickImageInfo.ReadCollection((string)null).ToArray());
 }
コード例 #8
0
 public void ShouldThrowExceptionWhenOffsetIsNegative()
 {
     ExceptionAssert.Throws <ArgumentException>("offset", () => MagickImageInfo.ReadCollection(new byte[] { 215 }, -1, 0).ToArray());
 }
コード例 #9
0
 public void ShouldThrowExceptionWhenDataIsNull()
 {
     ExceptionAssert.Throws <ArgumentNullException>("data", () => MagickImageInfo.ReadCollection((byte[])null).ToArray());
 }
コード例 #10
0
 public void ShouldThrowExceptionWhenDataIsEmpty()
 {
     Assert.Throws <ArgumentException>("data", () => MagickImageInfo.ReadCollection(Span <byte> .Empty));
 }
コード例 #11
0
 public void ShouldThrowExceptionWhenDataIsEmpty()
 {
     ExceptionAssert.ThrowsArgumentException("data", () => MagickImageInfo.ReadCollection(new byte[0]).ToArray());
 }