Example #1
0
        public void ShouldNotEqualEffectWithDifferentColorUsingNotEqualOp()
        {
            var a = new StaticKeyboardEffect(Color.Red);
            var b = new StaticKeyboardEffect(Color.Blue);

            Assert.True(a != b);
        }
Example #2
0
        public void ShouldNotEqualNull()
        {
            var effect = new StaticKeyboardEffect(Color.Red);

            Assert.AreNotEqual(effect, null);
            Assert.False(effect.Equals(null));
        }
Example #3
0
        public void ShouldNotEqualEffectWithDifferentColor()
        {
            var a = new StaticKeyboardEffect(Color.Red);
            var b = new StaticKeyboardEffect(Color.Blue);

            Assert.AreNotEqual(a, b);
        }
Example #4
0
        public void ShouldEqualEffectWithSameColorUsingNotEqualOp()
        {
            var a = new StaticKeyboardEffect(Color.Red);
            var b = new StaticKeyboardEffect(Color.Red);

            Assert.False(a != b);
        }
Example #5
0
        public void ShouldEqualEffectWithSameColor()
        {
            var a = new StaticKeyboardEffect(Color.Red);
            var b = new StaticKeyboardEffect(Color.Red);

            Assert.AreEqual(a, b);
        }
Example #6
0
        public void ShouldNotEqualEffectWithDifferentColorCastAsObject()
        {
            var effect = new StaticKeyboardEffect(Color.Red);
            var obj    = new StaticKeyboardEffect(Color.Blue) as object;

            Assert.False(effect.Equals(obj));
        }
Example #7
0
        public void ShouldEqualEffectWithSameColorCastAsObject()
        {
            var effect = new StaticKeyboardEffect(Color.Red);
            var obj    = new StaticKeyboardEffect(Color.Red) as object;

            Assert.True(effect.Equals(obj));
        }
Example #8
0
        public void ShouldNotEqualArbitraryObject()
        {
            var effect = new StaticKeyboardEffect(Color.Red);
            var obj    = new object();

            Assert.False(effect.Equals(obj));
        }
Example #9
0
        public void ShouldHaveSameHashcodeAsColor()
        {
            var color    = Color.Red;
            var hashcode = color.GetHashCode();
            var effect   = new StaticKeyboardEffect(color);

            Assert.AreEqual(hashcode, effect.GetHashCode());
        }