Пример #1
0
            public void ShouldNotSetTheAttributesWhenTheyAreNotSpecified()
            {
                using (var image = new MagickImage())
                {
                    var settings = new CompareSettings();

                    settings.SetImageArtifacts(image);

                    Assert.Empty(image.ArtifactNames);
                }
            }
Пример #2
0
            public void ShouldNotSetTheAttributesWhenTheyAreNotSpecified()
            {
                using (var image = new MagickImage())
                {
                    var settings = new CompareSettings();

                    settings.SetImageArtifacts(image);

                    Assert.IsNull(image.GetArtifact("compare:highlight-color"));
                    Assert.IsNull(image.GetArtifact("compare:lowlight-color"));
                    Assert.IsNull(image.GetArtifact("compare:masklight-color"));
                }
            }
Пример #3
0
            public void ShouldRemoveTheMasklightColor()
            {
                using (var image = new MagickImage())
                {
                    var settings = new CompareSettings
                    {
                        MasklightColor = MagickColors.Magenta,
                    };

                    settings.SetImageArtifacts(image);
                    settings.RemoveImageArtifacts(image);

                    Assert.Empty(image.ArtifactNames);
                }
            }
Пример #4
0
            public void ShouldRemoveTheMasklightColor()
            {
                using (var image = new MagickImage())
                {
                    var settings = new CompareSettings()
                    {
                        MasklightColor = MagickColors.Magenta,
                    };

                    settings.SetImageArtifacts(image);
                    settings.RemoveImageArtifacts(image);

                    Assert.IsNull(image.GetArtifact("compare:masklight-color"));
                }
            }
            public void ShouldRemoveTheLowlightColor()
            {
                using (var image = new MagickImage())
                {
                    var settings = new CompareSettings()
                    {
                        LowlightColor = MagickColors.Magenta,
                    };

                    settings.SetImageArtifacts(image);
                    settings.RemoveImageArtifacts(image);

                    EnumerableAssert.IsEmpty(image.ArtifactNames);
                }
            }
Пример #6
0
            public void ShouldSetTheMasklightColor()
            {
                using (var image = new MagickImage())
                {
                    var settings = new CompareSettings()
                    {
                        MasklightColor = MagickColors.Magenta,
                    };

                    settings.SetImageArtifacts(image);

#if Q8
                    Assert.AreEqual("#FF00FFFF", image.GetArtifact("compare:masklight-color"));
#else
                    Assert.AreEqual("#FFFF0000FFFFFFFF", image.GetArtifact("compare:masklight-color"));
#endif
                }
            }
Пример #7
0
            public void ShouldSetTheLowlightColor()
            {
                using (var image = new MagickImage())
                {
                    var settings = new CompareSettings
                    {
                        LowlightColor = MagickColors.Magenta,
                    };

                    settings.SetImageArtifacts(image);

                    Assert.Single(image.ArtifactNames);

#if Q8
                    Assert.Equal("#FF00FFFF", image.GetArtifact("compare:lowlight-color"));
#else
                    Assert.Equal("#FFFF0000FFFFFFFF", image.GetArtifact("compare:lowlight-color"));
#endif
                }
            }