package ru.pravvich;

import org.junit.Test;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;

public class BubbleTest {
    @Test
    public void whenSetNumbersThenSortingFromSmallToLarge() {
        double[] arr = new double[5];
        arr[0] = 91.6;
        arr[1] = 18.123;
        arr[2] = 54;
        arr[3] = 22;
        arr[4] = 14;
        Bubble bubble = new Bubble();
        double[] result = {14, 18.123, 22, 54, 91.6};
        assertThat(result,is(bubble.bubbleSort(arr)));
    }

    // Сортировка в обратном порядке
    @Test
    public void whenSetNumbersThenSortingFromLargeToSmall() {
        int[] arr = new int[5];
        arr[0] = 91;
        arr[1] = 18;
        arr[2] = 54;
        arr[3] = 22;
        arr[4] = 14;
        Bubble bubble = new Bubble();
        int[] result = {91, 54, 22, 18, 14};
        assertThat(result,is(bubble.bubbleSortBacking(arr)));
    }
}
@@ -246,132 +246,34 @@
 r = 
-new double%5B5%5D;%0A        arr%5B0%5D = 91.6;%0A        arr%5B1%5D = 18.123;%0A        arr%5B2%5D = 54;%0A        arr%5B3%5D = 22;%0A        arr%5B4%5D =
+%7B91.6, 18.123, 54, 22,
  14
+%7D
 ;%0A  
@@ -557,123 +557,28 @@
 r = 
-new int%5B5%5D;%0A        arr%5B0%5D = 91;%0A        arr%5B1%5D = 18;%0A        arr%5B2%5D = 54;%0A        arr%5B3%5D = 22;%0A        arr%5B4%5D =
+%7B91, 18, 54, 22,
  14
+%7D
 ;%0A  

add chapter_001/lesson_5/src/test/java/ru/pravvich/BubbleTest.java