Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • TestNG: As testing framework. We decided to move from junit to testNG some years ago when junit seemed to be stuck
  • Mockito: To allow easy mock-based testing. 
  • Hamcrest: To allow to read the asserts in a human-understandable way.

Testing a spring-based service or standard Java class

Actually this is the situation that you very often will write unit tests. You created or extended a service and want to ensure that it is working. So this is what you want to do:

...