1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- // Code generated by Clue Mock Generator v0.17.0, DO NOT EDIT.
- //
- // Command:
- // $ cmg gen douglasthrift.net/presence/ifttt
- package mockifttt
- import (
- "context"
- "testing"
- "goa.design/clue/mock"
- "douglasthrift.net/presence/ifttt"
- )
- type (
- Client struct {
- m *mock.Mock
- t *testing.T
- }
- ClientTriggerFunc func(ctx context.Context, present bool) (event string, err error)
- )
- func NewClient(t *testing.T) *Client {
- var (
- m = &Client{mock.New(), t}
- _ ifttt.Client = m
- )
- return m
- }
- func (m *Client) AddTrigger(f ClientTriggerFunc) {
- m.m.Add("Trigger", f)
- }
- func (m *Client) SetTrigger(f ClientTriggerFunc) {
- m.m.Set("Trigger", f)
- }
- func (m *Client) Trigger(ctx context.Context, present bool) (event string, err error) {
- if f := m.m.Next("Trigger"); f != nil {
- return f.(ClientTriggerFunc)(ctx, present)
- }
- m.t.Helper()
- m.t.Error("unexpected Trigger call")
- return "", nil
- }
- func (m *Client) HasMore() bool {
- return m.m.HasMore()
- }
|