예제 #1
0
        public void IntersectSecondNonStreamingExecution()
        {
            Data <object>             first  = DummyData;
            LateThrowingData <object> second = LateThrowingData();

            IEnumerable <object> enumerable = first.Intersect(second);

            Assert.Throws <LateThrownException>(() => enumerable.MoveNext()); // # Sequence was fully buffered, throwing LateThrownException after enumeration ended
        }
예제 #2
0
        protected LateThrowingData <object> LateThrowingData()
        {
            object[] data = new object[] { "Late", "Throwing", "Data" };
            LateThrowingData <object> dataEnumerable = new LateThrowingData <object>(data);

            DataEnumerables.Add((Data)dataEnumerable);

            return(dataEnumerable);
        }
예제 #3
0
        public void IntersectFirstStreamingExecution()
        {
            LateThrowingData <object> first  = LateThrowingData();
            Data <object>             second = Data <object>("Late", "Throwing");

            IEnumerable <object> enumerable = first.Intersect(second);

            Assert.DoesNotThrow(() => enumerable.MoveNext()); // # LateThrownException was not thrown since sequence was not fully enumerated
        }
예제 #4
0
        public void GroupJoinFirstStreamingExecution()
        {
            LateThrowingData <object> first  = LateThrowingData();
            Data <object>             second = DummyData;

            IEnumerable <object> enumerable = first.GroupJoin(second, x => x, x => x, (x, y) => x);

            Assert.DoesNotThrow(() => enumerable.MoveNext()); // # LateThrownException was not thrown since sequence was not fully enumerated
        }
예제 #5
0
        public void GroupJoinWithComparerSecondNonStreamingExecution()
        {
            Data <object>             first  = DummyData;
            LateThrowingData <object> second = LateThrowingData();

            IEnumerable <object> enumerable = first.GroupJoin(second, x => x, x => x, (x, y) => x, EqualityComparer <object> .Default);

            Assert.Throws <LateThrownException>(() => enumerable.MoveNext()); // # Sequence was fully buffered, throwing LateThrownException after enumeration ended
        }
예제 #6
0
        public void ExceptWithComparerFirstStreamingExecution()
        {
            LateThrowingData <object> first  = LateThrowingData();
            Data <object>             second = DummyData;

            IEnumerable <object> enumerable = first.Except(second, EqualityComparer <object> .Default);

            Assert.DoesNotThrow(() => enumerable.MoveNext()); // # LateThrownException was not thrown since sequence was not fully enumerated
        }
예제 #7
0
        public void JoinWithComparerFirstStreamingExecution()
        {
            LateThrowingData <object> first  = LateThrowingData();
            Data <object>             second = Data <object>("Late", "Throwing");

            IEnumerable <object> enumerable = first.Join(second, x => x, x => x, (x, y) => x, EqualityComparer <object> .Default);

            Assert.DoesNotThrow(() => enumerable.MoveNext()); // # LateThrownException was not thrown since sequence was not fully enumerated
        }