public void SortingOfStreams8() { var a = Enumerable.Empty <int>(); var b = Enumerable.Empty <int>(); IStreamSorter <int> streamSorter = new StreamSorter <int>(); var enumerable = streamSorter.Sort(new List <IEnumerable <int> > { a, b }, true); Assert.IsTrue(!enumerable.Any()); }
public void SortingOfStreams32() { var a = new[] { 2, 3 }; var b = Enumerable.Empty <int>(); IStreamSorter <int> streamSorter = new StreamSorter <int>(); var enumerable = streamSorter.Sort(new List <IEnumerable <int> > { a, b }, false).ToArray(); Assert.IsTrue(enumerable[0] == 2); Assert.IsTrue(enumerable[1] == 3); }
public int[] SortingOfStreams10(int[] a, int[] b) { IStreamSorter <int> streamSorter = new StreamSorter <int>(); var enumerable = streamSorter.Sort(new List <IEnumerable <int> > { a, b }, true); var res = new List <int>(); foreach (var i in enumerable) { Console.Write(i + " "); res.Add(i); } return(res.ToArray()); }