Advertisement
desislava_topuzakova

4. Bubble Sort Test

Mar 22nd, 2022
1,269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.42 KB | None | 0 0
  1. package p04_BubleSort;
  2.  
  3. import org.junit.Assert;
  4. import org.junit.Test;
  5. import p04_BubbleSortTest.Bubble;
  6.  
  7. public class BubbleTest {
  8.  
  9.     @Test
  10.     public void testBubbleSort() {
  11.         int [] numbers = {34, 2, 0, 45, 76, 23, 1, 8, 897, 39, 54};
  12.         Bubble.sort(numbers);
  13.         int [] expected = {0, 1, 2, 8, 23, 34, 39, 45, 54, 76, 897};
  14.         Assert.assertArrayEquals(expected, numbers);
  15.     }
  16.  
  17. }
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement