package ru.job4j.array;

import org.junit.Test;

import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;
/**
* Test.
*
* @author Alexey Leishin (lepishin.ao@yandex.ru)
* @version 1
* @since 29.05.2017
*/
public class TurnTest {
	/**
	* Test back.
	*/
    @Test
    public void whenTurnArrayWithEvenAmountOfElementsThenTurnedArray() {
        Turn turn = new Turn();
		int[] result = turn.back(1, 2, 3, 4, 5);
		int[] expected = {2, 6, 1, 4};
		assertThat(result, is(expected));
    }
	/**
	* Test back.
	*/
    @Test
    public void whenTurnArrayWithOddAmountOfElementsThenTurnedArray() {
        Turn turn = new Turn();
		int[] result = turn.back(1, 2, 3, 4, 5);
		int[] expected = {5, 4, 3, 2, 1};
		assertThat(result, is(expected));
    }
}
@@ -377,32 +377,61 @@
 n = new Turn();%0A
+%09%09int%5B%5D data = %7B4, 1, 6, 2%7D;%0A
 %09%09int%5B%5D result =
@@ -437,37 +437,28 @@
 = turn.back(
-1, 2, 3, 4, 5
+data
 );%0A%09%09int%5B%5D e
@@ -652,32 +652,64 @@
 n = new Turn();%0A
+%09%09int%5B%5D data = %7B1, 2, 3, 4, 5%7D;%0A
 %09%09int%5B%5D result =
@@ -719,29 +719,20 @@
 rn.back(
-1, 2, 3, 4, 5
+data
 );%0A%09%09int

task 4441_4