package ru.pravvich;

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

public class BubbleTest {
    @Test
    public void whenSetNumberThenCalculateFactorialSingleNumber() {
        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 = {14, 18, 22, 54, 91};
        assertThat(result,is(bubble.bubbleSort(arr)));
    }

    // Сортировка в обратном порядке
    @Test
    public void whenSetNumberThenCalculateFactorialSingleNber() {
        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)));
    }
}
@@ -112,9 +112,18 @@
 ert.
-*
+assertThat
 ;%0A%0Ap
@@ -190,42 +190,36 @@
 mber
+s
 Then
-CalculateFactorialSingleNumber
+SortingFromSmallToLarge
 () %7B
@@ -219,35 +219,38 @@
 rge() %7B%0A        
-int
+double
 %5B%5D arr = new int
@@ -238,35 +238,38 @@
 ble%5B%5D arr = new 
-int
+double
 %5B5%5D;%0A        arr
@@ -268,32 +268,34 @@
      arr%5B0%5D = 91
+.6
 ;%0A        arr%5B1%5D
@@ -291,32 +291,36 @@
      arr%5B1%5D = 18
+.123
 ;%0A        arr%5B2%5D
@@ -406,35 +406,38 @@
 bble();%0A        
-int
+double
 %5B%5D result = %7B14,
@@ -439,16 +439,20 @@
  %7B14, 18
+.123
 , 22, 54
@@ -455,16 +455,18 @@
 , 54, 91
+.6
 %7D;%0A     
@@ -602,40 +602,36 @@
 mber
+s
 Then
-CalculateFactorialSingleNber
+SortingFromLargeToSmall
 () %7B

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