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 })); }
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 })); }
public void ConcatenateNullArray() { Assert.Throws <ArgumentOutOfRangeException>(() => ArrayUtility.Concatenate(new int[] { }, null)); }
public void ConcatenateNullParams() { Assert.Throws <ArgumentNullException>(() => ArrayUtility.Concatenate <int>(null)); }
public void ConcatenateEmpty() { Assert.AreEqual(0, ArrayUtility.Compare(ArrayUtility.Concatenate(new int[] { }, new int[] { }), new int[] { })); }
public void ConcatenateNone() { Assert.AreEqual(0, ArrayUtility.Compare(ArrayUtility.Concatenate <int>(), new int[] { })); }