public void Remove_IndexIsTooLarge() { int[] array = { 0 }; int count = 1; int index = 1; Assert.Throws <ArgumentOutOfRangeException>(() => NArr.Remove(ref array, count, index)); }
public void Remove_CountIsTooSmall() { int[] array = { 0 }; int count = -1; int index = 0; Assert.Throws <ArgumentOutOfRangeException>(() => NArr.Remove(ref array, count, index)); }
public void Remove_EmptyArray() { int[] array = { }; int count = 0; int index = 0; Assert.Throws <ArgumentOutOfRangeException>(() => NArr.Remove(ref array, count, index)); }
public byte[] SmallCollectionFromSmallArray() { byte[] array = new byte[100]; NArr.Remove(ref array, 10, 0); return(array); }
public byte[] LargeCollectionFromLargeArray() { byte[] array = new byte[100000]; NArr.Remove(ref array, 50000, 49999); return(array); }
public void Remove_IsExpected() { int[] array = { 0, 1, 2, 3, 4, 5, 6, 7 }; int count = 7; int index = 1; int[] expected = { 0 }; NArr.Remove(ref array, count, index); Assert.AreEqual(expected, array); }