List/Grid Tag Archives: JUnit

powermock-logo

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 into your code in order to improve testability, increase test coverage ...
junit-logo

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 find that there are essentially two stereotypical patterns ...
junit-logo

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) together. Before I start on how best to compose ...
spring-logo

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 Spring Integration. I want to ...
logback-logo

JUnit, Logback, Maven with Spring 3

In this series we have already learnt to set up a basic Spring MVC application and learnt how to handle forms in Spring MVC. Now it is time to ...
apache-maven-logo

Categorize tests to reduce build time

Before we progress with the main content of the article, let’s get a few definitions out of the way. Unit tests Unit tests are tests that are small (tests ...
junit-logo

Tomcat Context JUnit @Rule

A first draft of a JUnit @Rule that create the test context. This can be used with the Spring context rule for this post to create a complete Spring context for integration tests. import ...
hamcrest-logo

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 ...
junit-logo

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 ...
hamcrest-logo

JUnit and Hamcrest: Improving On assertEquals

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 ...
Java Code Geeks and all content copyright © 2010-2014, Exelixis Media Ltd | Terms of Use | Privacy Policy
All trademarks and registered trademarks appearing on Java Code Geeks are the property of their respective owners.
Java is a trademark or registered trademark of Oracle Corporation in the United States and other countries.
Java Code Geeks is not connected to Oracle Corporation and is not sponsored by Oracle Corporation.
Do you want to know how to develop your skillset and become a ...
Java Rockstar?

Subscribe to our newsletter to start Rocking right now!

To get you started we give you two of our best selling eBooks for FREE!

Get ready to Rock!
You can download the complementary eBooks using the links below:
Close