public void ConcatenateOne()
        {
            var anFirst = new int[] { 1, 2, 4, 8 };

            Assert.AreEqual(0, ArrayUtility.Compare(ArrayUtility.Concatenate <int>(anFirst),
                                                    new int[] { 1, 2, 4, 8 }));
        }
Beispiel #2
0
 public void ConcatenateThree()
 {
     int[] anFirst  = new int[] { 1, 2, 4, 8 };
     int[] anSecond = new int[] { 8, 4, 2, 1 };
     int[] anThird  = new int[] { 3, 5, 6, 7 };
     Assert.AreEqual(0, ArrayUtility.Compare(ArrayUtility.Concatenate(anFirst, anSecond, anThird),
                                             new int[] { 1, 2, 4, 8, 8, 4, 2, 1, 3, 5, 6, 7 }));
 }
Beispiel #3
0
 public void ConcatenateNullArray()
 {
     Assert.Throws <ArgumentOutOfRangeException>(() => ArrayUtility.Concatenate(new int[] { }, null));
 }
Beispiel #4
0
 public void ConcatenateNullParams()
 {
     Assert.Throws <ArgumentNullException>(() => ArrayUtility.Concatenate <int>(null));
 }
Beispiel #5
0
 public void ConcatenateEmpty()
 {
     Assert.AreEqual(0, ArrayUtility.Compare(ArrayUtility.Concatenate(new int[] { }, new int[] { }), new int[] { }));
 }
Beispiel #6
0
 public void ConcatenateNone()
 {
     Assert.AreEqual(0, ArrayUtility.Compare(ArrayUtility.Concatenate <int>(), new int[] { }));
 }