junit 342

  1. How do I test a class that has private methods, fields or inner classes?
  2. How do you assert that a certain exception is thrown in JUnit 4 tests?
  3. Why doesn't JUnit provide assertNotEquals methods?
  4. How to run test methods in specific order in JUnit4?
  5. Maven does not find JUnit tests to run
  6. JUnit test for System.out.println()
  7. Conditionally ignoring tests in JUnit 4
  8. How to run JUnit test cases from the command line
  9. differences between 2 JUnit Assert classes
  10. Injecting Mockito mocks into a Spring bean
  11. Difference between @Before, @BeforeClass, @BeforeEach and @BeforeAll
  12. Mockito: Trying to spy on method is calling the original method
  13. How to capture a list of specific type with mockito
  14. Get name of currently executing test in JUnit 4
  15. Getting “NoSuchMethodError: org.hamcrest.Matcher.describeMismatch” when running test in IntelliJ 10.5
  16. Changing names of parameterized tests
  17. Java: Is assertEquals(String, String) reliable?
  18. IntelliJ IDEA with Junit 4.7 “!!! JUnit version 3.8 or later expected:”
  19. How to verify a method is called two times with mockito verify()
  20. Mockito : how to verify method was called on an object created within a method?
  21. Configuring IntelliJ IDEA for unit testing with JUnit
  22. When to use Mockito.verify()?
  23. Meaning of epsilon argument of assertEquals for double values
  24. JUnit XML format specification that Hudson supports
  25. When do Java generics require <? extends T> instead of <T> and is there any downside of switching?
  26. How does Junit @Rule work?
  27. Compare two JSON objects in Java
  28. Java: How to test methods that call System.exit()?
  29. Difference between setUp() and setUpBeforeClass()
  30. Why should I use Hamcrest-Matcher and assertThat() instead of traditional assertXXX()-Methods
  31. How to tell a Mockito mock object to return something different the next time it is called?
  32. Pass a local file in to URL in Java
  33. JUnit confusion: use 'extends TestCase' or '@Test'?
  34. Why use JUnit for testing?
  35. How to use Junit to test asynchronous processes
  36. Assert an object is a specific type
  37. Error:(23, 17) Failed to resolve: junit:junit:4.12
  38. JUnit vs TestNG
  39. AssertContains on strings in jUnit
  40. Checking that a List is not empty in Hamcrest
  41. Populating Spring @Value during Unit Test
  42. Junit: splitting integration test and Unit tests
  43. How to use ArgumentCaptor for stubbing?
  44. How to get the path of src/test/resources directory in JUnit?
  45. Mockito. Verify method arguments
  46. Warning: The method assertEquals from the type Assert is deprecated
  47. Assert List in Junit
  48. Python unittests in Jenkins?
  49. How to test that no exception is thrown?
  50. Separation of JUnit classes into special test package?