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