Hacker News new | ask | show | jobs
by MrDarcy 455 days ago
In Go at least you simply define an interface and use it as the receiver then inject whatever mock object you want.

The mock itself may simply be a new type defined in your test case.