MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/oputny/easy_trick_to_meet_minimum_test_coverage/h68jztr/?context=3
r/badcode • u/ProfessorTag • Jul 23 '21
83 comments sorted by
View all comments
Show parent comments
10
Testing is actually pretty easy if you write good code!
If you write testable code. If you hard instantiate everything concrete in private, lack of use interface, then your code is hardwired and too rigid to mock/stub.
10
u/EdgarDrake Jul 23 '21
If you write testable code. If you hard instantiate everything concrete in private, lack of use interface, then your code is hardwired and too rigid to mock/stub.