AreNotEqual() публичный статический Метод

public static AreNotEqual ( MagickColor notExpected, MagickColor actual ) : void
notExpected ImageMagick.MagickColor
actual ImageMagick.MagickColor
Результат void
Пример #1
0
        public void Test_FillColor()
        {
            using (MagickImage image = new MagickImage(MagickColors.Transparent, 100, 100))
            {
                ColorAssert.AreEqual(MagickColors.Black, image.Settings.FillColor);

                Pixel pixelA;
                image.Settings.FillColor = MagickColors.Red;
                image.Read("caption:Magick.NET");

                Assert.AreEqual(100, image.Width);
                Assert.AreEqual(100, image.Height);

                using (PixelCollection pixels = image.GetPixels())
                {
                    pixelA = pixels.GetPixel(69, 6);
                }

                Pixel pixelB;
                image.Settings.FillColor = MagickColors.Yellow;
                image.Read("caption:Magick.NET");
                using (PixelCollection pixels = image.GetPixels())
                {
                    pixelB = pixels.GetPixel(69, 6);
                }

                ColorAssert.AreNotEqual(pixelA.ToColor(), pixelB.ToColor());
            }
        }