/// <summary> /// Returns a hash code for the current object. /// </summary> /// <returns>A hash code for the current object.</returns> public override int GetHashCode() { // combine the hash codes of the various components of this class return(HashCodeUtility.CombineHashCodes(ObjectUtility.GetHashCode(m_text), m_count)); }
public void GetHashCodeValue() { Assert.AreEqual(3.GetHashCode(), ObjectUtility.GetHashCode(3)); }
public void GetHashCodeNull() { ObjectUtility.GetHashCode(default(string)); }
public void GetHashCodeNotNull() { const string str = "happy"; Assert.AreEqual(str.GetHashCode(), ObjectUtility.GetHashCode(str)); }
public void GetHashCode(object obj, int hashCode) { Assert.That(ObjectUtility.GetHashCode(obj), Is.EqualTo(hashCode)); }