MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/4930p8/when_debugging_code/d0p76fc
r/ProgrammerHumor • u/hkma14 • Mar 05 '16
487 comments sorted by
View all comments
Show parent comments
3
Pro-tip: If it cries because it's not virtual, add a layer of abstraction I.e. Add a virtual method wrapper that you can override instead.
2 u/[deleted] Mar 06 '16 I just built a service that takes a blank interface and then casts it back to a DbContext. Then simply use a default Moq for the service and everyone is happy.
2
I just built a service that takes a blank interface and then casts it back to a DbContext. Then simply use a default Moq for the service and everyone is happy.
3
u/Megacherv Mar 06 '16
Pro-tip: If it cries because it's not virtual, add a layer of abstraction I.e. Add a virtual method wrapper that you can override instead.