![cover-img](https://project-assets.showwcase.com/1420x/16381/1669477394135-syed-ahmad-yXTr6XeJDV8-unsplash.jpg?type=webp)
Code Smell 30 - Mocking Business
26 November, 2022
0
0
0
Contributors
Problems
•
Complexity
•
False safety sensation.
•
Parallel objects (Real and Mocks)
•
Maintainability
Solutions
1.
Mock just non-business entities.
2.
Remove mock if its interface has too much behavior.
Sample Code
Wrong
Right
Detection
Exceptions
•
Tags
•
Conclusion
Also Known as
•
More Info
Credits
The pesticide paradox. Every method you use to prevent or find bugs leaves a residue of subtler bugs against which those methods are ineffective.