Skip to content

Commit f469e08

Browse files
committed
Typos
1 parent d3c49c4 commit f469e08

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Diff for: _posts/2020-11-02-UnitTestingTips.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public void AccountController_SenderEmailIsNull_ThrowsException()
156156

157157
If we have similar scenarios, we can use a constant like `const string NoEmail = null`. Or prefer [object mothers and builders to create test data]({% post_url 2021-04-26-CreateTestValuesWithBuilders %}).
158158

159-
### Don't write mocks for IOptions<T>
159+
## 3. Don't write mocks for IOptions<T>
160160

161161
Finally, as an aside, we don't need a mock on `IOptions<EmailConfiguration>`.
162162

Diff for: _posts/2022-12-14-SimpleTestValues.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ Let's take a closer look at the first test. Do we need six dictionaries to test
108108

109109
And let's write separate tests to deal with edge cases. Let's write one test to work with `null` and another one with an empty dictionary. Again two dictionaries will be enough for each test.
110110

111-
Having too many dictionaries with too many items made us write that funny `foreach` with a funny multiplication inside. That's why some of the values are multiplied by 10, and others aren't. We don't need that with a simpler scenario. **Unit tests should only have assignments without branching or looping logic.**
111+
Having too many dictionaries with too many items made us write that funny `foreach` with a funny multiplication inside. That's why some of the values are multiplied by 10, and others aren't. We don't need that with a simpler scenario.
112+
113+
**Unit tests should only have assignments without branching or looping logic.**
112114

113115
Looking at the second test, we noticed it followed the same pattern as the first one. Too many items and a weird `foreach` with a multiplication inside.
114116

0 commit comments

Comments
 (0)