public void MergeWithLeftMultipleEntriesReturnsCorrectEntries()
        {
            var stat  = Mock.Of <IStatBuilder>();
            var form1 = Mock.Of <IFormBuilder>();
            var leftAndRightCondition = Mock.Of <IConditionBuilder>();
            var rightCondition        = Mock.Of <IConditionBuilder>();
            var leftCondition         = Mock.Of <IConditionBuilder>(
                c => c.And(rightCondition) == leftAndRightCondition);
            var rightEntry = EmptyEntry
                             .WithStat(stat)
                             .WithCondition(rightCondition);
            var left = CreateResult(
                EmptyEntry.WithCondition(leftCondition),
                EmptyEntry.WithForm(form1),
                EmptyEntry);
            var right    = CreateResult(rightEntry);
            var expected = new[]
            {
                EmptyEntry.WithStat(stat).WithCondition(leftAndRightCondition),
                EmptyEntry.WithForm(form1).WithStat(stat).WithCondition(rightCondition),
                EmptyEntry.WithStat(stat).WithCondition(rightCondition)
            };

            var result = left.MergeWith(right);

            CollectionAssert.AreEqual(expected, result.Entries);
        }
        public void MergeWithBothSingleEntryAndFormInBothThrows()
        {
            var entryLeft  = DefaultEntry;
            var entryRight = EmptyEntry
                             .WithForm(Mock.Of <IFormBuilder>());
            var left  = CreateResult(entryLeft);
            var right = CreateResult(entryRight);

            Assert.Throws <ArgumentException>(() => left.MergeWith(right));
        }