public void TestProductBiddingCategoryGetHashcode() { ProductBiddingCategory categoryA = new ProductBiddingCategory() { type = ProductDimensionType.BIDDING_CATEGORY_L1, value = 2L }; ProductBiddingCategory categoryB = new ProductBiddingCategory() { type = ProductDimensionType.BIDDING_CATEGORY_L1, value = 2L }; ProductBiddingCategory categoryC = new ProductBiddingCategory() { type = ProductDimensionType.BIDDING_CATEGORY_L2, value = 2L }; ProductBiddingCategory categoryD = new ProductBiddingCategory() { type = ProductDimensionType.BIDDING_CATEGORY_L1, value = 5L }; Assert.AreEqual(comparer.GetHashCode(categoryA), comparer.GetHashCode(categoryB)); Assert.AreNotEqual(comparer.GetHashCode(categoryA), comparer.GetHashCode(categoryC)); Assert.AreNotEqual(comparer.GetHashCode(categoryA), comparer.GetHashCode(categoryD)); }