Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FIRST to Testing Section #123

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Expand Up @@ -2470,6 +2470,20 @@ There's no excuse to not write tests. There's [plenty of good .NET test framewor

</details>

<details>
<summary><b>FIRST</b></summary>
A good and clean unit test should follow the FIRST principles.

- <b>Fast</b>: it should take little time to run, preferred milliseconds.
- <b>Isolated</b>: it should be isolated from each other and isolated from "external world" (such as HTTP calls, databases, files etc).
- <b>Repeatable</b>: it should always return the same result, unless the system under test changed..
- <b>Self-Checking</b>: it should be able automatically detect if their passed or failed.
- <b>Timely</b>: 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

</details>

<details>
<summary><b>Single concept per test</b></summary>

Expand Down