public void Shift_CountIsTooLarge() { int[] array = { 0, 0 }; int count = 3; Assert.Throws <ArgumentOutOfRangeException>(() => NArr.Shift(ref array, count)); }
public void Shift_EmptyArray() { int[] array = { }; int count = 1; Assert.Throws <ArgumentOutOfRangeException>(() => NArr.Shift(ref array, count)); }
public byte[] PositiveShiftOfSmallArray() { byte[] array = new byte[100]; NArr.Shift(ref array, 1); return(array); }
public byte[] NegativeShiftOfLargeArray() { byte[] array = new byte[100000]; NArr.Shift(ref array, -1); return(array); }
public void Shift_IsExpected() { int[] array = { 0, 1, 2, 3, 4, 5, 6, 7 }; int count = 3; int[] expected = { 5, 6, 7, 0, 1, 2, 3, 4 }; NArr.Shift(ref array, count); Assert.AreEqual(expected, array); }