public void ShouldNotEqualDifferentGrid() { var a = new CustomKeyboardEffect(Color.Red); var b = new CustomKeyboardEffect(Color.Pink); Assert.False(a == b); Assert.True(a != b); Assert.False(a.Equals(b)); Assert.AreNotEqual(a, b); }
public void ShouldEqualIdenticalGrid() { var a = new CustomKeyboardEffect(Color.Red); var b = new CustomKeyboardEffect(Color.Red); Assert.True(a == b); Assert.False(a != b); Assert.True(a.Equals(b)); Assert.AreEqual(a, b); }
public void ShouldNotEqualDifferent2DArray() { var grid = new CustomKeyboardEffect(Color.Pink); var arr = new Color[KeyboardConstants.MaxRows][]; // Populate the 2D array for (var row = 0; row < KeyboardConstants.MaxRows; row++) { arr[row] = new Color[KeyboardConstants.MaxColumns]; for (var col = 0; col < KeyboardConstants.MaxColumns; col++) { arr[row][col] = Color.Red; } } Assert.False(grid == arr); Assert.True(grid != arr); Assert.False(grid.Equals(arr)); Assert.AreNotEqual(grid, arr); }