---
title: "Comment by Rodrigo on \"Unit tests - what are they and why don't you write any?\" | Hashnode"
description: "Hi Katy, great post. I enjoyed the reading; It shows that you know what you are talking about. Although I have some clarifications to make (I hope you don&#39;t"
url: "https://hashnode.com/posts/unit-tests-what-are-they-and-why-dont-you-write-any/6179a4ff6584fe6ae5984da7/comment/61859fcc936da605cb9ab101"
---

[Discussion](https://hashnode.com/posts/unit-tests-what-are-they-and-why-dont-you-write-any/6179a4ff6584fe6ae5984da7)

Comment [Unit tests - what are they and why don't you write any?](https://hashnode.com/posts/unit-tests-what-are-they-and-why-dont-you-write-any/6179a4ff6584fe6ae5984da7)

[Rodrigo](https://hashnode.com/@rodrigomd)

[Nov 5, 2021](https://hashnode.com/posts/unit-tests-what-are-they-and-why-dont-you-write-any/6179a4ff6584fe6ae5984da7/comment/61859fcc936da605cb9ab101)

Hi Katy, great post. I enjoyed the reading; It shows that you know what you are talking about.

Although I have some clarifications to make (I hope you don't mind)

> A unit test is the smallest test you can do on your code.

That depends. When you work with TDD or TCR you write even smaller tests (micro tests) and all together they make up a unit test.

> The perfect unit test class will only test ONE class.

Many people associate that idea with "unit", which must be a class, function, or module. It is actually a **behavior** in which the behavior could be modeled by the interaction of multiple classes or functions. It doesn't necessarily mean having a to test just one class, module, or function.

[Katy A](https://hashnode.com/@KatyCodesStuff)

[Nov 14, 2021](https://hashnode.com/posts/unit-tests-what-are-they-and-why-dont-you-write-any/6179a4ff6584fe6ae5984da7/comment/61859fcc936da605cb9ab101#reply-6191052583e4212d6e579967)

Hey Rodrigo, thanks for the comment.

My article is intended to summarise unit testing, rather than go into a lot of detail.

In general, unit tests are written to test one class at a time.
