Advertisement
Guest User

Untitled

a guest
Nov 28th, 2014
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. package reproduce;
  2.  
  3. import org.junit.After;
  4. import org.junit.Test;
  5. import static org.junit.experimental.results.PrintableResult.testResult;
  6.  
  7. public class FailingTest
  8. {
  9. static int objCount = 0;
  10.  
  11. public FailingTest()
  12. {
  13. objCount++;
  14. }
  15.  
  16. @Test
  17. public void test()
  18. {
  19. System.out.println(objCount);
  20. }
  21.  
  22. @After
  23. public void tearDown()
  24. {
  25. testResult(FailingTest.class); // comment this to run only once
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement