public void MoveZeroesTest() { int[] arr = { 1, 2, 3, 0, 0, 2, 4, 2, 0, 4 }; MoveZeroes mz = new MoveZeroes(); mz.Move_zeroes(arr); CollectionAssert.AreEqual(new int[] { 1, 2, 3, 2, 4, 2, 4, 0, 0, 0 }, arr); }
public void MoveZeroesSolution() { var nums = new[] { 0, 1, 0, 3, 12 }; var res = new[] { 1, 3, 12, 0, 0 }; var testClass = new MoveZeroes(); testClass.Solution(nums); Assert.AreEqual(nums, res); }
public void moveZeroesTest() { foreach (MoveZeroesTestData testData in TestDataList) { Console.WriteLine("Test input: " + string.Join(",", testData.InputArray)); MoveZeroes.moveZeroes(testData.InputArray); Console.WriteLine("Test output: " + string.Join(",", testData.InputArray)); CollectionAssert.AreEqual(testData.InputArray, testData.OutputArray); } }
public void Test() { Assert.AreEqual(new int[] { 1, 2, 1, 1, 3, 1, 0, 0, 0, 0 }, MoveZeroes.Do(new int[] { 1, 2, 0, 1, 0, 1, 0, 3, 0, 1 })); }
void InternalTest(int[] nums, int[] expected) { MoveZeroes.Solve(nums); AssertHelper.AssertArrays(expected, nums); }
public void BeforeEach() { MoveZeroes = new MoveZeroes(); }
public void ZeroMoverTest() { Assert.Equal(new int[] { 1, 2, 1, 1, 3, 1, 0, 0, 0, 0 }, MoveZeroes.Move(new int[] { 1, 2, 0, 1, 0, 1, 0, 3, 0, 1 })); }