How does JUnit work?

  • JUnit seems to magically call your classes for you
  • Where is the main method? Doesn't Java need that?
  • It comes from the JUnit library itself!
  • JUnit can examine your classes and check which methods have a @Test annotation

4 / 21