Beispiel #1
0
        public void DifferentValueObjectsComparisonMustBeTrueWithObjectNotEqualityOperator()
        {
            var builder             = new MoneyValueObjectBuilder();
            var firstMoneyResource  = builder.GetMoney(Amount);
            var secondMoneyResource = builder.GetMoney(Amount + 32000);

            Assert.True(firstMoneyResource != secondMoneyResource);
        }
Beispiel #2
0
        public void SameValueObjectsComparisonMustBeFalseWithObjectNotEqualityOperator()
        {
            var builder             = new MoneyValueObjectBuilder();
            var firstMoneyResource  = builder.GetMoney(Amount);
            var secondMoneyResource = builder.GetMoney(Amount);

            Assert.False(firstMoneyResource != secondMoneyResource);
        }
Beispiel #3
0
        public void DifferentValueObjectsMustNotEqualWithObjectEqualityOperator()
        {
            var builder             = new MoneyValueObjectBuilder();
            var firstMoneyResource  = builder.GetMoney(Amount);
            var secondMoneyResource = builder.GetMoney(Amount + 32000);

            Assert.False(firstMoneyResource == secondMoneyResource);
        }
Beispiel #4
0
        public void SameValueObjectsMustBeEqualWithObjectEqualityOperator()
        {
            var builder             = new MoneyValueObjectBuilder();
            var firstMoneyResource  = builder.GetMoney(Amount);
            var secondMoneyResource = builder.GetMoney(Amount);

            Assert.True(firstMoneyResource == secondMoneyResource);
        }
Beispiel #5
0
        public void DifferentValueObjectsMustBeNotEqualsWithEqualsMethod()
        {
            var builder             = new MoneyValueObjectBuilder();
            var firstMoneyResource  = builder.GetMoney(Amount);
            var secondMoneyResource = builder.GetMoney(Amount + 32000);

            Assert.False(firstMoneyResource.Equals(secondMoneyResource));
        }
Beispiel #6
0
        public void SameValueObjectsMustBeEqualsWithEqualsMethod()
        {
            var builder             = new MoneyValueObjectBuilder();
            var firstMoneyResource  = builder.GetMoney(Amount);
            var secondMoneyResource = builder.GetMoney(Amount);

            Assert.True(firstMoneyResource.Equals(secondMoneyResource));
        }