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

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