public void Insert_IndexIsTooSmall() { int[] array = { }; int[] collection = { }; int index = -1; Assert.Throws <ArgumentOutOfRangeException>(() => NArr.Insert(ref array, collection, index)); }
public void Insert_NullCollection() { int[] array = { 0, 1, 2, 5, 6, 7 }; int[] collection = null; int index = 3; Assert.Throws <ArgumentNullException>(() => NArr.Insert(ref array, collection, index)); }
public void Insert_NullArray() { int[] array = null; int[] collection = { 3, 4 }; int index = 3; Assert.Throws <ArgumentNullException>(() => NArr.Insert(ref array, collection, index)); }
public byte[] SmallCollectionIntoEmptyArray() { byte[] array = new byte[0]; byte[] collection = new byte[100]; NArr.Insert(ref array, collection, 0); return(array); }
public byte[] LargeCollectionIntoLargeArray() { byte[] array = new byte[100000]; byte[] collection = new byte[100000]; NArr.Insert(ref array, collection, 49999); return(array); }
public void Insert_EmptyCollection() { int[] array = { 0, 1, 2, 3, 4, 5, 6, 7 }; int[] collection = { }; int index = 3; int[] expected = { 0, 1, 2, 3, 4, 5, 6, 7 }; NArr.Insert(ref array, collection, index); Assert.AreEqual(expected, array); }