// Code generated by Clue Mock Generator v0.17.0, DO NOT EDIT. // // Command: // $ cmg gen douglasthrift.net/presence package mockpresence import ( "context" "testing" "goa.design/clue/mock" "douglasthrift.net/presence" "douglasthrift.net/presence/ifttt" ) type ( Detector struct { m *mock.Mock t *testing.T } DetectorDetectFunc func(ctx context.Context) error DetectorConfigFunc func(config *presence.Config) DetectorClientFunc func(client ifttt.Client) ) func NewDetector(t *testing.T) *Detector { var ( m = &Detector{mock.New(), t} _ presence.Detector = m ) return m } func (m *Detector) AddDetect(f DetectorDetectFunc) { m.m.Add("Detect", f) } func (m *Detector) SetDetect(f DetectorDetectFunc) { m.m.Set("Detect", f) } func (m *Detector) Detect(ctx context.Context) error { if f := m.m.Next("Detect"); f != nil { return f.(DetectorDetectFunc)(ctx) } m.t.Helper() m.t.Error("unexpected Detect call") return nil } func (m *Detector) AddConfig(f DetectorConfigFunc) { m.m.Add("Config", f) } func (m *Detector) SetConfig(f DetectorConfigFunc) { m.m.Set("Config", f) } func (m *Detector) Config(config *presence.Config) { if f := m.m.Next("Config"); f != nil { f.(DetectorConfigFunc)(config) return } m.t.Helper() m.t.Error("unexpected Config call") } func (m *Detector) AddClient(f DetectorClientFunc) { m.m.Add("Client", f) } func (m *Detector) SetClient(f DetectorClientFunc) { m.m.Set("Client", f) } func (m *Detector) Client(client ifttt.Client) { if f := m.m.Next("Client"); f != nil { f.(DetectorClientFunc)(client) return } m.t.Helper() m.t.Error("unexpected Client call") } func (m *Detector) HasMore() bool { return m.m.HasMore() }