Beispiel #1
0
        public void RemoveElementTestCase2()
        {
            var testData = new[] { 0, 1, 2, 2, 3, 0, 4, 2 };
            var result   = RemoveElementInPlace.RemoveElement(testData, 2);

            result.Should().Be(5);
            testData.Should().StartWith(new[] { 0, 1, 3, 0, 4 });
        }
Beispiel #2
0
        public void RemoveElementTestCase1()
        {
            var testData = new[] { 3, 2, 2, 3 };
            var result   = RemoveElementInPlace.RemoveElement(testData, 3);

            result.Should().Be(2);
            testData.Should().StartWith(new[] { 2, 2 });
        }