Tag Archives: Unit Testing

Reflection-Based Object Comparison in Tests

Using reflection is a convenient way to compare objects in unit tests. The Unitils library provides reflection-based assertions. Continue reading

Posted in Java | Tagged , , , , | Leave a comment

Comparison Dialog in JUnit for Objects Other Than Strings

This article describes how to to compare objects in JUnit in case of test failure using the dialog known from comparing strings. Continue reading

Posted in Java | Tagged , , , | 2 Comments

Working With Static Imports in Eclipse

Eclipse has few that make working with static imports easier including keyboard shortcut for adding static import and favorite static members for code completion. Continue reading

Posted in Java | Tagged , , , | 2 Comments

Intuitive Behavior Verification With Mockito

Mockito makes behavior verification similar to expressing standard assertions. It is much more intuitive than popular frameworks that use expect-run-verify pattern. Continue reading

Posted in Java | Tagged , , , | 8 Comments

Custom Assertions in FEST Assert

Using FEST Assert library helps to reduce duplication in unit tests and make assertions look almost like a natural language. Continue reading

Posted in Java | Tagged , , | 3 Comments