示例#1
0
        public void Remove_IndexIsTooLarge()
        {
            int[] array = { 0 };
            int   count = 1;
            int   index = 1;

            Assert.Throws <ArgumentOutOfRangeException>(() => NArr.Remove(ref array, count, index));
        }
示例#2
0
        public void Remove_CountIsTooSmall()
        {
            int[] array = { 0 };
            int   count = -1;
            int   index = 0;

            Assert.Throws <ArgumentOutOfRangeException>(() => NArr.Remove(ref array, count, index));
        }
示例#3
0
        public void Remove_EmptyArray()
        {
            int[] array = { };
            int   count = 0;
            int   index = 0;

            Assert.Throws <ArgumentOutOfRangeException>(() => NArr.Remove(ref array, count, index));
        }
示例#4
0
        public byte[] SmallCollectionFromSmallArray()
        {
            byte[] array = new byte[100];

            NArr.Remove(ref array, 10, 0);

            return(array);
        }
示例#5
0
        public byte[] LargeCollectionFromLargeArray()
        {
            byte[] array = new byte[100000];

            NArr.Remove(ref array, 50000, 49999);

            return(array);
        }
示例#6
0
        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);
        }