Category Archives: JUnit

PHPHOST BLOG

Web Hosting Related Articles You May Need

Better JUnit-based Unit Tests with NetBeans 7.4 beta Hints

In my last post, I wrote about hints provided in NetBeans 7.4 beta that improve a developer’s ability to avoid nasty runtime issues with Java exception handling. In this post, I look at how two more hints provided by NetBeans 7.4 beta can be used to ma… Continue reading

Posted in JUnit, NetBeans, Syndicated, Unit Testing | Comments Off on Better JUnit-based Unit Tests with NetBeans 7.4 beta Hints

Hamcrest Containing Matchers

The Hamcrest 1.3 Javadoc documentation for the Matchers class adds more documentation for several of that class’s methods than were available in Hamcrest 1.2. For example, the four overloaded contains methods have more descriptive Javadoc documentation… Continue reading

Posted in JUnit, Syndicated, Unit Testing | Comments Off on Hamcrest Containing Matchers

Moving Beyond Core Hamcrest in JUnit

In the post Improving On assertEquals with JUnit and Hamcrest I introduced use of Hamcrest with JUnit. I then looked at JUnit’s Built-in Hamcrest Core Matcher Support. In this post, I look at how to apply Hamcrest’s non-core matchers with JUnit. These … Continue reading

Posted in JUnit, NetBeans, Syndicated, Unit Testing | Comments Off on Moving Beyond Core Hamcrest in JUnit

JUnit’s Built-in Hamcrest Core Matcher Support

In the post Improving On assertEquals with JUnit and Hamcrest, I briefly discussed Hamcrest “core” matchers being “baked in” with modern versions of JUnit. In that post, I focused particularly on use of JUnit’s assertThat(T, Matcher) static method coup… Continue reading

Posted in JUnit, Syndicated, Unit Testing | Comments Off on JUnit’s Built-in Hamcrest Core Matcher Support

Improving On assertEquals with JUnit and Hamcrest

In my blog post Are Static Imports Becoming Increasingly Accepted in Java?, I discussed the increasing use of static imports in Java to make code more fluent in certain contexts. Unit testing in Java has been particularly affected by the static import … Continue reading

Posted in JUnit, Syndicated, Unit Testing | Comments Off on Improving On assertEquals with JUnit and Hamcrest

JavaOne 2010: JUnit Kung Fu: Getting More Out of Your Unit Tests

My Wednesday at JavaOne 2010 began with John Ferguson Smart’s standing-room-only presentation “JUnit Kung Fu: Getting More Out of Your Unit Tests.” Most of the overcapacity audience responded in the affirmative when Smart asked who uses JUnit. While th… Continue reading

Posted in JavaOne 2010, JUnit, Syndicated | Comments Off on JavaOne 2010: JUnit Kung Fu: Getting More Out of Your Unit Tests

JavaOne 2010: Unit Testing That’s Not So Bad: Small Things That Make a Big Difference

I knew that the JavaOne 2010 presentation “Unit Testing That’s Not That Bad: Small Things That Make a Big Difference” would be popular and so I signed up for it early and made sure I got there in the time period in which early access seating appli… Continue reading

Posted in Java (General), JavaOne 2010, JUnit, Syndicated | Comments Off on JavaOne 2010: Unit Testing That’s Not So Bad: Small Things That Make a Big Difference