public void Test_MakeArray_WhenCapacityLowerThanSize()
        {
            var array = new DynArray <int>();

            for (var i = 0; i < 20; i++)
            {
                array.Append(i);
            }
            Assert.Catch <ArgumentException>(() => array.MakeArray(17));
        }
        public void Test_MakeArray_WhenNewCapacityIsHigher()
        {
            var newCapacity = 100;
            var newCount    = 18;
            var array       = new DynArray <int>();

            for (var i = 0; i < newCount; i++)
            {
                array.Append(i + 1);
            }
            var arrayRepr = "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18]";

            array.MakeArray(newCapacity);
            Assert.AreEqual(newCapacity, array.capacity);
            Assert.AreEqual(newCount, array.count);
            Assert.AreEqual(arrayRepr, array.ToString());
        }
        public void Test_MakeArray_WhenWrongNegativeCapacity()
        {
            var array = new DynArray <int>();

            Assert.Catch <ArgumentException>(() => array.MakeArray(0));
        }