public void Move_ArrayWithNumbers2Zeros_ZerosAtEnd() { int[] input = new int[] { 0, 1, 0, 3, 12 }; MoveZeros.Move(input); int[] correct = new int[] { 1, 3, 12, 0, 0 }; CollectionAssert.AreEqual(correct, input); }
public void Move_ArrayWithAllZeros_ArrayIsUnchanged() { int[] input = new int[] { 0, 0, 0, 0 }; MoveZeros.Move(input); int[] correct = new int[] { 0, 0, 0, 0 }; CollectionAssert.AreEqual(correct, input); }
public void Move_WhenCalled_ShouldMoveAllZeroToLast(int[] num, int[] expected) { var helper = new MoveZeros(); var result = helper.Move(num); Assert.That(result, Is.EqualTo(expected)); }