示例#1
0
        public void CommissionRates_AreNotEqual()
        {
            // Arrange
            var rate1 = new CommissionRateValue(1m);
            var rate2 = new CommissionRateValue(0.03m);

            // Act
            var areEqual = rate1 == rate2;

            // Assert
            areEqual.Should().BeFalse();
        }
示例#2
0
        public void CommissionRates_WhenNotEqual_HaveDifferentHashCodes()
        {
            // Arrange
            var rate1 = new CommissionRateValue(1m);
            var rate2 = new CommissionRateValue(0.03m);

            // Act
            var hashCodesEqual = rate1.GetHashCode() == rate2.GetHashCode();

            // Assert
            hashCodesEqual.Should().BeFalse();
        }
示例#3
0
        public void CommissionRates_WhenEqual_HaveSameHashCode()
        {
            // Arrange
            var rate1 = new CommissionRateValue(1m);
            var rate2 = new CommissionRateValue(1m);

            // Act
            var hashCodesEqual = rate1.GetHashCode() == rate2.GetHashCode();

            // Assert
            hashCodesEqual.Should().BeTrue();
        }