示例#1
0
        public void Append_NullCollection()
        {
            int[] array      = { 0, 1, 2, 3, 4, 5 };
            int[] collection = null;

            Assert.Throws <ArgumentNullException>(() => NArr.Append(ref array, collection));
        }
示例#2
0
        public void Append_NullArray()
        {
            int[] array      = null;
            int[] collection = { 6, 7 };

            Assert.Throws <ArgumentNullException>(() => NArr.Append(ref array, collection));
        }
示例#3
0
        public void AppendSingleElement()
        {
            byte[] array      = new byte[0];
            byte[] collection = new byte[1];

            NArr.Append(ref array, collection);
        }
示例#4
0
        public void AppendLargeCollection()
        {
            byte[] array      = new byte[0];
            byte[] collection = new byte[100000000];

            NArr.Append(ref array, collection);
        }
示例#5
0
        public void Append_IsExpected()
        {
            int[] array      = { 0, 1, 2, 3, 4, 5 };
            int[] collection = { 6, 7 };

            int[] expected = { 0, 1, 2, 3, 4, 5, 6, 7 };
            NArr.Append(ref array, collection);

            Assert.AreEqual(expected, array);
        }