Entries from August 2006

August 11, 2006

TestNG gets a full book chapter

I was happy to discover that TestNG is now covered in a full chapter of the book Beginning POJOs by Brian Sam-Bodden.

The author puts aside JUnit, and introduces the reader to TestNG concepts. After a concise intro, the author builds more complex tests integrating DbUnit and EasyMock (as you may already know EasyMock 2 is [...]

August 8, 2006

More on JMock and TestNG

Firstly, I would like to provide a small fix to the code provided in the previous entry: JMock for TestNG (or JUnit-free JMock)

/**
* Verify the expected behavior for the mocks registered by the current thread and
* also releases them.
*/
public static synchronized void verifyAndRelease() {
Thread currentThread= Thread.currentThread();
List mocks = s_mockObjects.get(currentThread);
[...]