-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Unit Testing | ||
|
||
## Guidelines | ||
The AAA (Arrange, Act, Assert) pattern is a common way of writing unit tests for a method under test. | ||
|
||
* The **Arrange** section of a unit test method initializes objects and sets the value of the data that is passed to the method under test. | ||
* The **Act** section invokes the method under test with the arranged parameters. | ||
* The **Assert** section verifies that the action of the method under test behaves as expected. | ||
|
||
Taken from https://docs.microsoft.com/en-us/visualstudio/test/unit-test-basics?view=vs-2019 | ||
|
||
If you are finding you need to test a lot of private behavior, most likely you have a new 'class' hiding within the class you are trying to test, extract it and test it by its public interface. | ||
|
||
Taken from https://stackoverflow.com/questions/9122708/unit-testing-private-methods-in-c-sharp |