Пример #1
0
        public void RemoveAtShouldWork()
        {
            var Arr = new int[4] {
                1, 2, 5, 8
            };

            HW.RemoveAt(ref Arr, 1);

            Arr.Should().BeEquivalentTo(new int[] { 1, 5, 8 });
        }
Пример #2
0
        public void RemoveAtShouldWorkWithSizeOne()
        {
            var Arr = new int[1] {
                1
            };

            HW.RemoveAt(ref Arr, 0);

            Arr.Should().BeEquivalentTo(Array.Empty <int>());
        }
Пример #3
0
        public void RemoveAtShouldThrowIfOutOfBounds()
        {
            var Arr = new int[1] {
                1
            };

            HW.RemoveAt(ref Arr, 0);

            Arr.Should().BeEquivalentTo(Array.Empty <int>());
        }
Пример #4
0
        public void RemoveAtShouldWorkWithSizeTwo()
        {
            var Arr = new int[2] {
                1, 2
            };

            HW.RemoveAt(ref Arr, 1);

            Arr.Should().BeEquivalentTo(new int[] { 1 });
        }