Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package p04_BubbleSortTest;
- import org.junit.Assert;
- import org.junit.Test;
- public class BubbleTest {
- @Test
- public void testSort () {
- int[] arr = {100, 13, 7, 0, - 5, 2};
- Bubble.sort(arr); //сортира масива
- int [] expectedSortedArray = {-5, 0, 2, 7, 13, 100};
- for (int i = 0; i < expectedSortedArray.length; i++) {
- Assert.assertEquals(expectedSortedArray[i], arr[i]);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement