GetHashCode() public method

public GetHashCode ( ) : int
return int
        public void GetHashCode_UseSameAndDifferentRanges_SameOrDifferentHashCodes()
        {
            WarningHeaderValue warning1 = new WarningHeaderValue(214, "host", "\"Transformation applied\"");
            WarningHeaderValue warning2 = new WarningHeaderValue(214, "HOST", "\"Transformation applied\"");
            WarningHeaderValue warning3 = new WarningHeaderValue(215, "host", "\"Transformation applied\"");
            WarningHeaderValue warning4 = new WarningHeaderValue(214, "other", "\"Transformation applied\"");
            WarningHeaderValue warning5 = new WarningHeaderValue(214, "host", "\"TRANSFORMATION APPLIED\"");
            WarningHeaderValue warning6 = new WarningHeaderValue(214, "host", "\"Transformation applied\"",
                new DateTimeOffset(2010, 7, 19, 18, 31, 27, TimeSpan.Zero));
            WarningHeaderValue warning7 = new WarningHeaderValue(214, "host", "\"Transformation applied\"",
                new DateTimeOffset(2011, 7, 19, 18, 31, 27, TimeSpan.Zero));
            WarningHeaderValue warning8 = new WarningHeaderValue(214, "host", "\"Transformation applied\"",
                new DateTimeOffset(2010, 7, 19, 18, 31, 27, TimeSpan.Zero));

            Assert.Equal(warning1.GetHashCode(), warning2.GetHashCode());
            Assert.NotEqual(warning1.GetHashCode(), warning3.GetHashCode());
            Assert.NotEqual(warning1.GetHashCode(), warning4.GetHashCode());
            Assert.NotEqual(warning1.GetHashCode(), warning6.GetHashCode());
            Assert.NotEqual(warning1.GetHashCode(), warning7.GetHashCode());
            Assert.NotEqual(warning6.GetHashCode(), warning7.GetHashCode());
            Assert.Equal(warning6.GetHashCode(), warning8.GetHashCode());
        }