Beispiel #1
0
        public void ShouldNotEqualDifferentEffect()
        {
            var a = new CustomMouseEffect(Color.Red);
            var b = new CustomMouseEffect(Color.Blue);

            Assert.False(a == b);
            Assert.True(a != b);
            Assert.False(a.Equals(b));
            Assert.AreNotEqual(a, b);
        }
Beispiel #2
0
        public void ShouldEqualIdenticalEffect()
        {
            var a = new CustomMouseEffect(Color.Red);
            var b = new CustomMouseEffect(Color.Red);

            Assert.True(a == b);
            Assert.False(a != b);
            Assert.True(a.Equals(b));
            Assert.AreEqual(a, b);
        }
Beispiel #3
0
        public void ShouldNotEqualDifferent1DArray()
        {
            var grid = new CustomMouseEffect(Color.Pink);
            var arr  = new Color[MouseConstants.MaxLeds];

            for (var index = 0; index < MouseConstants.MaxLeds; index++)
            {
                arr[index] = Color.Red;
            }

            Assert.False(grid == arr);
            Assert.True(grid != arr);
            Assert.False(grid.Equals(arr));
            Assert.AreNotEqual(grid, arr);
        }
Beispiel #4
0
        public void ShouldNotEqualDifferent2DArray()
        {
            var effect = new CustomMouseEffect(Color.Red);

            var array = new Color[MouseConstants.MaxRows][];

            for (var row = 0; row < MouseConstants.MaxRows; row++)
            {
                array[row] = new Color[MouseConstants.MaxColumns];

                for (var column = 0; column < MouseConstants.MaxColumns; column++)
                {
                    array[row][column] = Color.Blue;
                }
            }

            Assert.False(effect == array);
            Assert.True(effect != array);
            Assert.False(effect.Equals(array));
            Assert.AreNotEqual(effect, array);
        }