JUnit
-
Enterprise Java
Enhancing Spring Test Framework with beforeClass and afterClass setup
How to allow instance methods to run as JUnit BeforeClass behavior JUnit allows you to setup methods on the class…
Read More » -
Enterprise Java
Testing Custom Exceptions with JUnit’s ExpectedException and @Rule
Exception Testing Why test exception flows? Just like with all of your code, test coverage writes a contract between your…
Read More » -
Enterprise Java
JUnit Pass Test Case on Failures
Why create a mechanism to expect a test failure? There comes a time when one would want and expect a…
Read More » -
Core Java
Test Driven Traps, part 2
The Story of a Unit in Unit Tests In the previous part of this article, you could see some bad,…
Read More » -
Enterprise Java
Spring Testing Support and Context caching
Spring provides a comprehensive support for unit and integration testing – through annotations to load up a Spring application context,…
Read More » -
Core Java
Using PowerMock to Mock Constructors
In my opinion, one of the main benefits of dependency injection is that you can inject mock and/or stub objects…
Read More » -
Enterprise Java
5 Tips for Unit Testing Threaded Code
Here’s a few tips on how take make testing your code for logical correctness (as opposed to multi-threaded correctness). I…
Read More » -
Enterprise Java
Tips for testing with Java
Introduction I love automated testing. In a rare diversion into op-ed1 I thought a put few thoughts (read – opinions)…
Read More » -
Enterprise Java
Spring Integration – Session 2 – More Hello Worlds
This is a follow up to Spring Integration Session 1 The first session was a simple Hello World application using…
Read More »