Other articles


  1. Writing Hamcrest Matchers

    JUnit 4 introduced a fancy DSL based on the Hamcrest framework for expressing assertions. JUnit ships with the most important matchers and you can always add Hamcrest to your classpath if you need more. Sometimes no existing matcher fits your needs and you have to roll your own. Since it's …

    read more
  2. JUnit: Using External Resources

    Many integration test cases need access to external resources like files or databases. Dealing with external resources is always messy because you have to set up state and tear it down later. Since JUnit 4.7, there's a mechanism that makes things a bit more convenient.

    Previously when you had …

    read more

social