Example #1
0
        public void Equals_TwoStatelessCombinations()
        {
            SecurableClassDefinition orderClass   = _testHelper.CreateOrderClassDefinition();
            StateCombination         combination1 = _testHelper.CreateStateCombination(orderClass);
            StateCombination         combination2 = _testHelper.CreateStateCombination(orderClass);

            StateCombinationComparer comparer = new StateCombinationComparer();

            Assert.That(comparer.Equals(combination1, combination2), Is.True);
        }
Example #2
0
        public void Equals_TwoDifferent()
        {
            SecurableClassDefinition orderClass      = _testHelper.CreateOrderClassDefinition();
            StatePropertyDefinition  paymentProperty = _testHelper.CreatePaymentStateProperty(orderClass);
            StateCombination         combination1    = _testHelper.CreateStateCombination(orderClass, paymentProperty[EnumWrapper.Get(PaymentState.None).Name]);
            StateCombination         combination2    = _testHelper.CreateStateCombination(orderClass, paymentProperty[EnumWrapper.Get(PaymentState.Paid).Name]);

            StateCombinationComparer comparer = new StateCombinationComparer();

            Assert.That(comparer.Equals(combination1, combination2), Is.False);
        }