Skip to content

Commit ad23aa1

Browse files
committed
add info for observable behavior vs implementation details
1 parent 6c980be commit ad23aa1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -956,6 +956,10 @@ final class ValidTestExample extends TestCase
956956
}
957957
```
958958

959+
:information_source: The first subscription model has a bad design. To invoke one business operation you need to call three methods. Also using getters to verify operation is not a good practice.
960+
In this case, it's skipped checking a change of modifiedAt, probably setting specific modifiedAt during a renew operation can be tested with an expiration business operation. The getter for modifiedAt is not required.
961+
Of course, there are cases where finding the possibility to avoid getters provided only for tests will be very hard, but always we should try to not introduce them.
962+
959963
## Unit of behavior
960964

961965
:x: Bad:

0 commit comments

Comments
 (0)