Tag Unit Testing

3 things that will make or break your project

This article is about 3 things that can make or break any software project.

Assertion messages in tests

In this post, we’ll talk about whether or not you should use assertion messages in tests.

You are naming your tests wrong!

Giving your tests expressive names is important. Proper naming helps understand what the test verifies and how the underlying system behaves. In this post, we’ll take a look at a popular, yet inferior naming convention and see how it can be improved.

I'm writing a book!

I’m writing a book called Unit Testing: Principles, Patterns and Practices.

Non-determinism in tests

This is the final post in my series about unit testing anti-patterns. This one is about non-determinism in tests.

Overriding methods in classes-dependencies

I’m continuing my unit testing anti-patterns article series. Today, we will talk about overriding methods in classes-dependencies.

Code pollution

This is another post from my unit testing anti-patterns article series. Today, we will talk about code pollution.

To TDD or not to TDD

To TDD or not to TDD? Is this question even relevant or maybe it’s enough to just write tests, no matter before the code or afterward? Let’s see.

Exposing private state to enable unit testing

Last time, we talked about making private methods publicĀ in order to enable unit testing. It’s not the only way people expose implementation details to the outside world for unit testing purposes, though. Today, we’ll look at a similar anti-pattern: exposing private state.

Unit testing private methods

I’m starting a new series about unit testing anti-patterns. This post is the first article in that series.

When it comes to unit testing, one of the most commonly asked questions is: how to test a private method?