How to mock receiver in method
forjoin92 opened this issue · 0 comments
forjoin92 commented
Here is my codes:
type A interface {
aaa() string
cstring() string
}
type B struct {
c string
}
func (b *B) aaa() string {
...
s := b.cstring()
...
}
func (b *B) cstring() string {
return b.c
}
How can I mock b.cstring() in B.aaa()?