Ejemplo n.º 1
0
        public void RemoveElementTest(int[] givenArr, int givenVal, int[] expectedArr, int expectedVal)
        {
            //Arrange
            //var givenArray = new int[] { 3, 2, 2, 3 };
            //var givenArray = new int[] { 0, 1, 2, 2, 3, 0, 4, 2 };
            //var givenVal = 2;
            //var expectedResult = 5;

            //Action
            int outputLengh = Easy.RemoveElement(givenArr, givenVal);

            //Assert
            Assert.AreEqual(outputLengh, expectedVal);
            expectedArr.ToExpectedObject().ShouldEqual(givenArr.Take(outputLengh).ToArray());
        }