Java 8 Friday: Most Internal DSLs are Outdated
At Data Geekery, we love Java. And as we’re really into jOOQ’s fluent API and query DSL, we’re absolutely thrilled about what Java 8 will bring to our ecosystem. Java 8 Friday Every Friday, we’re...
View ArticleJUnit: Testing Exceptions with Java 8 and AssertJ 3.0.0
AssertJ 3.0.0 release for Java 8 makes testing exceptions much easier than before. In one of my previous blog post I described how to utilize plain Java 8 to achieve this, but with AssertJ 3.0.0 much...
View ArticleAssertJ’s SoftAssertions – do we need them?
One of the rules of writing good unit test is that it should fail for one reason, so unit test should test one logical concept. Sometime it is quite tough to have a single assertion per test. To follow...
View ArticleModern TDD-oriented Java 8 JUnit test template for Idea (with Mockito and...
Tune up your JUnit test class template for Idea with the BDD-like syntax, Java 8 and the Mockito-AssertJ duo. Topics covered in this article may seem trivial. However, from my trainer experience I know...
View ArticleJUnit 5 meets AssertJ
JUnit 5 brings a lot of improvements in the assertions library, mainly thanks to Java 8 and Lambda Expression support and thanks to the presence of the new assertions like assertAll, assertTimeout...
View ArticleClean Code from the Trenches – Writing Executable Specifications with JUnit...
Executable Specifications are tests that can also serve as design specifications. They enable technical and business teams to get on the same page by enabling the use of a common language (in DDD-world...
View ArticleAll Your Tests Belong to You: Maintaining Mixed JUnit 4/JUnit 5 and...
If you are seasoned Java developer who practices test-driven development (hopefully, everyone does it), it is very likely JUnit 4 has been your one-stop-shop testing toolbox. Personally, I truly loved...
View ArticleUnleash the Power of AssertJ: Make Your Unit Tests Crystal Clear
Unit tests are the superheroes of the coding world, ensuring your code works as intended. But writing clear and concise unit tests can sometimes feel like a challenge. Here’s where AssertJ swoops in to...
View ArticleAssertJ Ignore Fields Comparison Example
1. Introduction AssertJ is a fluent assertion library for Java. It’s open-source and supported by the AssertJ team under Apache License 2.0. Its fluent API is designed to make assertions more readable...
View ArticleModern Java Testing Frameworks: Exploring JUnit 5, Mockito, and AssertJ
Testing is a crucial aspect of software development that ensures code reliability and functionality. In Java, several powerful testing frameworks have emerged to make the process easier and more...
View Article