Advertisement
Guest User

Untitled

a guest
Jul 25th, 2014
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.77 KB | None | 0 0
  1.     /**
  2.      * Tears down the test fixture.
  3.      *
  4.      * Called after every test case method.
  5.      */
  6.     @After
  7.     public void tearDown()
  8.     {
  9.         stable.clear();
  10.     }
  11.  
  12.     private void verifyAnyOrder(String expected)
  13.     {
  14.         String actual = outContent.toString(); // for debug purposes
  15.         stdOut.println(actual);
  16.  
  17.         String[] actualStrings = actual.split(NEWLINE);
  18.         String[] expectedStrings = expected.split(NEWLINE);
  19.  
  20.         int i = actualStrings.length;
  21.         assertEquals(MAJOR_ERROR_MESSAGE, expectedStrings.length, i);
  22.  
  23.         Arrays.sort(actualStrings);
  24.         Arrays.sort(expectedStrings);
  25.  
  26.         while (0 != i--)
  27.             assertEquals(MINOR_ERROR_MESSAGE, expectedStrings[i], actualStrings[i]);
  28.     } // end method
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement