willmont1982 / codes

0 stars 0 forks source link

Correção de bugs e inserção de método para preencher planilha XLS sem duplicidade #6

Open willmont1982 opened 4 years ago

willmont1982 commented 4 years ago
public void doesItSuccessfullySwapAdjacentNumbersInTheBeginning() {
    Integer[] numbers = new Integer[] { 3, 1, 5, 7 };
    Integer[] expectedNumbers = new Integer[] { 1, 3, 5, 7 };
    Operation swapOperation = new SwapOperation(0, 1);
    ExecutableOperation swapOperation = new SwapOperation(0, 1);
    swapOperation.execute(numbers);
    assertArrayEquals(expectedNumbers, numbers);
}

@@ -18,7 +18,7 @@ public void doesItSuccessfullySwapAdjacentNumbersInTheBeginning() { public void doesItSuccessfullySwapAdjacentNumbersInTheMiddle() { Integer[] numbers = new Integer[] { 1, 5, 3, 7 }; Integer[] expectedNumbers = new Integer[] { 1, 3, 5, 7 }; Operation swapOperation = new SwapOperation( 1, 2); ExecutableOperation swapOperation = new SwapOperation( 1, 2); swapOperation.execute(numbers); assertArrayEquals(expectedNumbers, numbers); } @@ -27,7 +27,7 @@ public void doesItSuccessfullySwapAdjacentNumbersInTheMiddle() { public void doesItSuccessfullySwapAdjacentNumbersInTheEnding() { Integer[] numbers = new Integer[] { 1, 3, 7, 5 }; Integer[] expectedNumbers = new Integer[] { 1, 3, 5, 7 }; Operation swapOperation = new SwapOperation(2, 3); ExecutableOperation swapOperation = new SwapOperation(2, 3); swapOperation.execute(numbers); assertArrayEquals(expectedNumbers, numbers); } @@ -36,7 +36,7 @@ public void doesItSuccessfullySwapAdjacentNumbersInTheEnding() { public void doesItSuccessfullySwapFirstAndLastNumber() { Integer[] numbers = new Integer[] { 7, 3, 5, 1 }; Integer[] expectedNumbers = new Integer[] { 1, 3, 5, 7 }; Operation swapOperation = new SwapOperation(0, 3); ExecutableOperation swapOperation = new SwapOperation(0, 3); swapOperation.execute(numbers); assertArrayEquals(expectedNumbers, numbers); }