A few years ago I was one of those developers who write unit tests for my data access code. I was testing everything in isolation, and I was pretty pleased with myself. I honestly thought that I was doing a good job. Oh boy was I wrong! This blog post describes why we shouldn’t write […] Read More about Writing Tests for Data Access Code - Unit Tests Are Waste
Programming (24 / 37)
Getting Started With Gradle: Dependency Management
It is challenging, if not impossible, to create real life applications which don't have any external dependencies. That is why dependency management is a vital part of every software project. This blog post describes how we can manage the dependencies of our projects with Gradle. We will learn to configure the used repositories and the […] Read More about Getting Started With Gradle: Dependency Management
Getting Started With Gradle: Our First Java Project
This blog post describes how we can compile and package a simple Java project by using Gradle. Our Java project has only one requirement: Our build script must create an executable jar file. In other words, we must be able to run our program by using the command: Let's find out how we can fulfil […] Read More about Getting Started With Gradle: Our First Java Project
Getting Started With Gradle: Introduction
Gradle is a build tool which replaces XML based build scripts with an internal DSL which is based on Groovy programming language. It has gained a lot of traction recently and that is I why I decided to take a closer look at it. This blog post is the first part of my Gradle tutorial, […] Read More about Getting Started With Gradle: Introduction
Writing Clean Tests - Divide and Conquer
A good unit test should fail for only one reason. This means that a proper unit test tests only one logical concept. If we want to write clean tests, we have to identify those logical concepts, and write only one test case per logical concept. This blog post describes how we can identify the logical […] Read More about Writing Clean Tests - Divide and Conquer
Writing Clean Tests - Replace Assertions with a Domain-Specific Language
Automated tests are worthless if they don’t assert anything, but the problem of regular JUnit assertions is that they speak the wrong language and become messy if we have to write a lot of them. If we want to write tests which are both easy understand and maintain, we have to figure out a better […] Read More about Writing Clean Tests - Replace Assertions with a Domain-Specific Language