public void TestSortedMergeSequenceNullException() { const IEnumerable <int> sequenceA = null; var sequenceB = new BreakingSequence <int>(); sequenceA.SortedMerge(OrderByDirection.Ascending, sequenceB); }
public void TestSortedMergeOtherSequencesNullException() { var sequenceA = new BreakingSequence <int>(); Assert.ThrowsArgumentNullException("otherSequences", () => sequenceA.SortedMerge(OrderByDirection.Ascending, (IEnumerable <int>[])null)); }
public void TestInterleaveDoNotCallGetEnumeratorEagerly() { var sequenceA = TestingSequence.Of(1); var sequenceB = new BreakingSequence <int>(); sequenceA.Interleave(sequenceB).Take(1).Consume(); }
public void IndexIsLazy() { var bs = new BreakingSequence <object>(); bs.Index(); bs.Index(0); }
public void TestSortedMergeIsLazy() { var sequenceA = new BreakingSequence <int>(); var sequenceB = new BreakingSequence <int>(); sequenceA.SortedMerge(OrderByDirection.Ascending, sequenceB); }
public void FullGroupIsLazy() { var bs = new BreakingSequence <int>(); var bf = BreakingFunc.Of <int, int>(); var bfg = BreakingFunc.Of <int, IEnumerable <int>, IEnumerable <int>, int>(); bs.FullGroupJoin(bs, bf, bf, bfg); }
public void FullGroupIsLazy() { var listA = new BreakingSequence <int>(); var listB = new BreakingSequence <int>(); listA.FullGroupJoin(listB, x => x, x => x, BreakingFunc.Of <int, IEnumerable <int>, IEnumerable <int>, int>()); Assert.True(true); }
public void TestInterleaveDisposesOnErrorAtGetEnumerator() { using var sequenceA = TestingSequence.Of <int>(); var sequenceB = new BreakingSequence <int>(); // Expected and thrown by BreakingSequence Assert.Throws <InvalidOperationException>(() => sequenceA.Interleave(sequenceB).Consume()); }
public void TestSortedMergeSequenceNullException() { const IEnumerable <int> sequenceA = null; var sequenceB = new BreakingSequence <int>(); Assert.ThrowsArgumentNullException("source", () => sequenceA.SortedMerge(OrderByDirection.Ascending, sequenceB)); }
public void FullGroupIsLazy() { var listA = new BreakingSequence <int>(); var listB = new BreakingSequence <int>(); listA.FullGroupJoin(listB, x => x, x => x, DummySelector); Assert.True(true); }
public void GroupAdjacentIsLazy() { var bs = new BreakingSequence <object>(); bs.GroupAdjacent(delegate { return(0); }); bs.GroupAdjacent(delegate { return(0); }, o => o); bs.GroupAdjacent(delegate { return(0); }, o => o, EqualityComparer <int> .Default); bs.GroupAdjacent(delegate { return(0); }, EqualityComparer <int> .Default); }
public void LeftJoinIsLazy() { var xs = new BreakingSequence <int>(); var ys = new BreakingSequence <object>(); Assert.DoesNotThrow(() => xs.LeftJoin(ys, x => x, y => y.GetHashCode(), BreakingFunc.Of <int, object>(), BreakingFunc.Of <int, object, object>())); }
public void LeftJoinWithHomogeneousSequencesIsLazy() { var xs = new BreakingSequence <int>(); var ys = new BreakingSequence <int>(); Assert.DoesNotThrow(() => xs.LeftJoin(ys, e => e, BreakingFunc.Of <int, object>(), BreakingFunc.Of <int, int, object>())); }
public void RightJoinWithComparerIsLazy() { var xs = new BreakingSequence <int>(); var ys = new BreakingSequence <object>(); Assert.DoesNotThrow(() => xs.RightJoin(ys, x => x.GetHashCode(), y => y, BreakingFunc.Of <object, object>(), BreakingFunc.Of <int, object, object>(), comparer: null)); }
public void RightJoinWithHomogeneousSequencesWithComparerIsLazy() { var xs = new BreakingSequence <int>(); var ys = new BreakingSequence <int>(); Assert.DoesNotThrow(() => xs.RightJoin(ys, e => e, BreakingFunc.Of <int, object>(), BreakingFunc.Of <int, int, object>(), comparer: null)); }
public void GroupAdjacentIsLazy() { var bs = new BreakingSequence <object>(); var bf = BreakingFunc.Of <object, int>(); var bfo = BreakingFunc.Of <object, object>(); var bfg = BreakingFunc.Of <int, IEnumerable <object>, IEnumerable <object> >(); bs.GroupAdjacent(bf); bs.GroupAdjacent(bf, bfo); bs.GroupAdjacent(bf, bfo, EqualityComparer <int> .Default); bs.GroupAdjacent(bf, EqualityComparer <int> .Default); bs.GroupAdjacent(bf, bfg); bs.GroupAdjacent(bf, bfg, EqualityComparer <int> .Default); }
public void ZipIsLazy() { var bs = new BreakingSequence <int>(); bs.EquiZip <int, int, int>(bs, delegate { throw new NotImplementedException(); }); }
public void ZipShortestIsLazy() { var bs = new BreakingSequence <int>(); bs.ZipShortest(bs, BreakingFunc.Of <int, int, int>()); }
public void ExceptByIsLazyWithComparer() { var bs = new BreakingSequence <string>(); bs.ExceptBy(bs, BreakingFunc.Of <string, string>(), StringComparer.Ordinal); }
public void TestSortedMergeOtherSequencesNullException() { var sequenceA = new BreakingSequence <int>(); sequenceA.SortedMerge(OrderByDirection.Ascending, (IEnumerable <int>[])null); }
public void ZipIsLazy() { var bs = new BreakingSequence <int>(); bs.EquiZip(bs, BreakingFunc.Of <int, int, int>()); }
public void ExceptByIsLazy() { var bs = new BreakingSequence <string>(); bs.ExceptBy(bs, BreakingFunc.Of <string, int>()); }