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

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

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

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

            Assert.True(firstMoneyResource == secondMoneyResource);
        }
Example #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));
        }
Example #6
0
        public void SameValueObjectsMustBeEqualsWithEqualsMethod()
        {
            var builder             = new MoneyValueObjectBuilder();
            var firstMoneyResource  = builder.GetMoney(Amount);
            var secondMoneyResource = builder.GetMoney(Amount);

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