by Jabbles · 12y ago · 0 comments
type DummyJob struct {
Job
}
DummyJob now implements Job, you can override whatever methods you need.If you don't initialize the embedded interface, non-overridden methods called on the struct will panic.
Agreed that it's all quite a bit more of a pain than using a serious mocking toolkit, though changes in testing practices and API design help substantially.