public void Test_HashCodeNotEquals() { //---------------Set up test pack------------------- UIGridColumn gridColumn = new UIGridColumn("pp", "pp", "", "", false, 0, PropAlignment.centre, null); UIGridColumn otherColumn = new UIGridColumn("pp", "qq", "", "", false, 0, PropAlignment.centre, null); //---------------Assert preconditions---------------- Assert.IsFalse(gridColumn.Equals(otherColumn)); //---------------Execute Test ---------------------- //---------------Test Result ----------------------- Assert.AreNotEqual(gridColumn.GetHashCode(), otherColumn.GetHashCode()); }
public void Test_HashCodeEquals() { //---------------Set up test pack------------------- UIGridColumn gridColumn = new UIGridColumn("pp", "pp", "", "", false, 0, PropAlignment.centre, null); IUIGridColumn clonedGridColumn = gridColumn.Clone(); //---------------Assert preconditions---------------- Assert.IsTrue(gridColumn.Equals(clonedGridColumn)); //---------------Execute Test ---------------------- //---------------Test Result ----------------------- Assert.AreEqual(gridColumn.GetHashCode(), clonedGridColumn.GetHashCode()); }