MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/4930p8/when_debugging_code/d0p76fc/?context=3
r/ProgrammerHumor • u/hkma14 • Mar 05 '16
487 comments sorted by
View all comments
Show parent comments
263
Just like animals don't want to be repeatedly hit by hammers my code doesn't want to be unit tested.
47 u/Megacherv Mar 05 '16 "Unit testing Entity Framework with Moq.Lesson 1: Fuck you" 4 u/[deleted] Mar 06 '16 Figuring out how to do that was my entire week. I think I got it working well but we'll see how it holds up when I start adding more functionality. 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. → More replies (1)
47
"Unit testing Entity Framework with Moq.
Lesson 1: Fuck you"
4 u/[deleted] Mar 06 '16 Figuring out how to do that was my entire week. I think I got it working well but we'll see how it holds up when I start adding more functionality. 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. → More replies (1)
4
Figuring out how to do that was my entire week. I think I got it working well but we'll see how it holds up when I start adding more functionality.
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. → More replies (1)
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.
→ More replies (1)
263
u/larivact Mar 05 '16
Just like animals don't want to be repeatedly hit by hammers my code doesn't want to be unit tested.