Exemple #1
0
        public void ConcatenateCombinesMultipleSequences()
        {
            var sequence1 = new List <int> {
                1, 2, 3, 4, 5
            };
            var sequence2 = new List <int> {
                6, 7, 8, 9, 10
            };
            var sequence3 = new List <int> {
                11, 12, 13, 14, 15
            };

            var combined = EnumerableExtensions.Concatenate(sequence1, sequence2, sequence3);

            Assert.AreEqual(15, combined.Count());
        }
Exemple #2
0
        public void ConcatentateCombinesSingleArrayOfSequences()
        {
            List <int>[] sequences = new List <int>[]
            {
                new List <int> {
                    1, 2, 3, 4, 5
                },
                new List <int> {
                    6, 7, 8, 9, 10
                },
                new List <int> {
                    11, 12, 13, 14, 15
                }
            };

            var combined = EnumerableExtensions.Concatenate(sequences);

            Assert.AreEqual(15, combined.Count());
        }
Exemple #3
0
 public void ConcatenateThrowsIfSequencesAreNull()
 {
     Assert.Throws <ArgumentNullException>(() => EnumerableExtensions.Concatenate <TestItem>(null));
 }