public void GetHashCode_UseSameAndDifferentProductInfos_SameOrDifferentHashCodes() { ProductInfoHeaderValue productInfo1 = new ProductInfoHeaderValue("product", "1.0"); ProductInfoHeaderValue productInfo2 = new ProductInfoHeaderValue(new ProductHeaderValue("product", "1.0")); ProductInfoHeaderValue productInfo3 = new ProductInfoHeaderValue("(comment)"); ProductInfoHeaderValue productInfo4 = new ProductInfoHeaderValue("(COMMENT)"); Assert.Equal(productInfo1.GetHashCode(), productInfo2.GetHashCode()); Assert.NotEqual(productInfo1.GetHashCode(), productInfo3.GetHashCode()); Assert.NotEqual(productInfo3.GetHashCode(), productInfo4.GetHashCode()); }