File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -247,6 +247,17 @@ public function deactivating_an_inactive_subscription_is_invalid(): void
247
247
:information_source : Describing the behavior is important in testing the domain scenarios.
248
248
If your code is just a utility one it's less important.
249
249
250
+ :question : Why would it be useful for a non-programmer to read unit tests?
251
+
252
+ If there is a project with complex domain logic, this logic must be very clear for everyone,
253
+ so then tests describe domain details without technical keywords, and you can talk with a business in a language like in these tests.
254
+
255
+ All code that is related to the domain should be free from technical details. A non-programmer won't be read these tests,
256
+ but if you want to talk about the domain these tests will be useful to know what this domain does.
257
+ There will be a description without technical details e.g. returns null, throws an exception, etc.
258
+ This kind of information has nothing to do with the domain, so we shouldn't use these keywords.
259
+
260
+
250
261
## AAA pattern
251
262
252
263
It's also common Given, When, Then.
You can’t perform that action at this time.
0 commit comments