Posts

Showing posts from March, 2014

Week 12 and 13 review

Welcome to the next installment of Codeleak.pl: Week Review! . I want to share with you some interesting reads that I encountered within last two weeks. A very subjective selection.

Week 10 and 11 Review

Welcome to the next installment of Codeleak.pl: Week Review! . I want to share with you some interesting reads that I encountered this and previous week. A very subjective selection.

HOW-TO: Test dependencies in a Maven project (JUnit, Mocito, Hamcrest, AssertJ)

Image
JUnit itself is not enough for most of today's Java projects. You also need a mocking library, maybe something else. In this mini HOW-TO I present the test dependencies you can start with in a new Java project.

Week 09 Review

Welcome to the next installment of Codeleak.pl: Week Review! . I want to share with you some interesting reads that I encountered this week. A very subjective selection.

JUnit ExpectedException rule: beyond basics

Image
There are different ways of handling exceptions in JUnit tests. As I wrote in one of my previous posts , my preferable way is using org.junit.rules.ExpectedException rule. Basically, rules are used as an alternative (or an addition) to methods annotated with org.junit.Before , org.junit.After , org.junit.BeforeClass , or org.junit.AfterClass , but they are more powerful, and more easily shared between projects and classes. In this post I will show more advanced usage of org.junit.rules.ExpectedException rule.