public void ShouldReturnMinusOneForInvalidChannel() { using (IMagickImage image = new MagickImage(Files.MagickNETIconPNG)) { using (IPixelCollection pixels = image.GetPixelsUnsafe()) { int index = pixels.GetIndex(PixelChannel.Black); Assert.AreEqual(-1, index); } } }
public void ShouldReturnIndexForValidChannel() { using (IMagickImage image = new MagickImage(Files.MagickNETIconPNG)) { using (IPixelCollection pixels = image.GetPixelsUnsafe()) { int index = pixels.GetIndex(PixelChannel.Green); Assert.AreEqual(1, index); } } }
public void GetIndex_ValidChannel_ReturnsIndex() { using (IMagickImage image = new MagickImage(Files.MagickNETIconPNG)) { using (IPixelCollection pixels = image.GetPixels()) { int index = pixels.GetIndex(PixelChannel.Green); Assert.AreEqual(1, index); } } }