Advertisement
Guest User

Untitled

a guest
Apr 25th, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. import static org.junit.Assert.*;
  2. import org.junit.Test;
  3.  
  4. public class statementcoverage {
  5.  
  6. sort SortClass = new sort();
  7. Object[] expectedArray = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
  8. Object[] unsortedArray = {4, 3, 1, 5, 6, 8 , 2, 9, 10, 7};
  9.  
  10. @Test
  11. public void statementCoverageTest() {
  12. SortClass.Shellsort(unsortedArray);
  13. for(int i = 0; i < unsortedArray.length; i++){
  14. System.out.println(unsortedArray[i]);
  15. }
  16. assertEquals(expectedArray, unsortedArray);
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement