コード例 #1
0
        public void ensureSameWidthsProducesSameHashCode()
        {
            ProductSlotWidths slotWidths    = ProductSlotWidths.valueOf(4, 14, 8);
            ProductSlotWidths otherInstance = ProductSlotWidths.valueOf(4, 14, 8);

            Assert.Equal(slotWidths.GetHashCode(), otherInstance.GetHashCode());
        }
コード例 #2
0
        public void ensureDifferentRecommendedWidthProducesDifferenceHashCode()
        {
            ProductSlotWidths slotWidths    = ProductSlotWidths.valueOf(4, 14, 8);
            ProductSlotWidths otherInstance = ProductSlotWidths.valueOf(4, 16, 10);

            Assert.NotEqual(slotWidths.GetHashCode(), otherInstance.GetHashCode());
        }