diff --git a/README.md b/README.md index c4b2b8f..78f4141 100644 --- a/README.md +++ b/README.md @@ -2470,6 +2470,20 @@ There's no excuse to not write tests. There's [plenty of good .NET test framewor +
+ FIRST +A good and clean unit test should follow the FIRST principles. + +- Fast: it should take little time to run, preferred milliseconds. +- Isolated: it should be isolated from each other and isolated from "external world" (such as HTTP calls, databases, files etc). +- Repeatable: it should always return the same result, unless the system under test changed.. +- Self-Checking: it should be able automatically detect if their passed or failed. +- Timely: it should not take too much time to be written when compared to their system under test code. + +> Source https://learn.microsoft.com/en-us/dotnet/core/testing/unit-testing-best-practices#characteristics-of-a-good-unit-test + +
+
Single concept per test