public void ShouldReturnTheCorrectValueWhenOtherIsHigher() { var color = new ColorMono(true); var other = new ColorMono(false); Assert.Equal(-1, color.CompareTo(other)); }
public void ShouldSetTheCorrectValue() { var color = new ColorMono(false); color.IsBlack = true; Assert.True(color.IsBlack); }
public void ShouldInitializeTheProperties() { var color = MagickColors.Black; var grayColor = ColorMono.FromMagickColor(color); Assert.Equal(grayColor, color); }
public void ShouldReturnFalseWhenOtherAsObjectIsNotEqual() { var color = new ColorMono(true); var other = new ColorMono(false); Assert.False(color.Equals((object)other)); }
public void ShouldReturnTrueWhenOtherIsEqual() { var color = new ColorMono(false); var other = new ColorMono(false); Assert.True(color.Equals(other)); }
public void ShouldReturnDifferentValueWhenChannelChanged() { var first = new ColorMono(true); var hashCode = first.GetHashCode(); first.IsBlack = false; Assert.NotEqual(hashCode, first.GetHashCode()); }
public void ShouldReturnTheCorrectValueWhenInstancesAreNotEqual() { var first = new ColorMono(false); var second = new ColorMono(true); Assert.False(first == second); Assert.True(first != second); Assert.False(first < second); Assert.False(first <= second); Assert.True(first > second); Assert.True(first >= second); }
public void ShouldReturnTheCorrectValueWhenInstanceIsNull() { var color = new ColorMono(false); Assert.False(color is null); Assert.True(color != null); Assert.False(color < null); Assert.False(color <= null); Assert.True(color > null); Assert.True(color >= null); Assert.False(null == color); Assert.True(null != color); Assert.True(null < color); Assert.True(null <= color); Assert.False(null > color); Assert.False(null >= color); }
public void ShouldReturnTheCorrectValueWhenCastedFromMagickColor() { ColorMono actual = MagickColors.White; Assert.False(actual.IsBlack); }
public void ShouldReturnTheCorrectValueWhenOtherIsEqual() { var color = new ColorMono(true); Assert.Equal(0, color.CompareTo(color)); }
public void ShouldReturnNullWhenValueIsNull() { var result = ColorMono.FromMagickColor(null); Assert.Null(result); }
public void ShouldReturnFalseWhenOtherAsObjectIsNull() { var color = new ColorMono(true); Assert.False(color.Equals((object)null)); }