forked from nikoksr/notify
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmock_slack_client.go
65 lines (52 loc) · 1.76 KB
/
mock_slack_client.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// Code generated by mockery v2.14.0. DO NOT EDIT.
package slack
import (
context "context"
slack_goslack "github.com/slack-go/slack"
mock "github.com/stretchr/testify/mock"
)
// mockSlackClient is an autogenerated mock type for the slackClient type
type mockSlackClient struct {
mock.Mock
}
// PostMessageContext provides a mock function with given fields: ctx, channelID, options
func (_m *mockSlackClient) PostMessageContext(ctx context.Context, channelID string, options ...slack_goslack.MsgOption) (string, string, error) {
_va := make([]interface{}, len(options))
for _i := range options {
_va[_i] = options[_i]
}
var _ca []interface{}
_ca = append(_ca, ctx, channelID)
_ca = append(_ca, _va...)
ret := _m.Called(_ca...)
var r0 string
if rf, ok := ret.Get(0).(func(context.Context, string, ...slack_goslack.MsgOption) string); ok {
r0 = rf(ctx, channelID, options...)
} else {
r0 = ret.Get(0).(string)
}
var r1 string
if rf, ok := ret.Get(1).(func(context.Context, string, ...slack_goslack.MsgOption) string); ok {
r1 = rf(ctx, channelID, options...)
} else {
r1 = ret.Get(1).(string)
}
var r2 error
if rf, ok := ret.Get(2).(func(context.Context, string, ...slack_goslack.MsgOption) error); ok {
r2 = rf(ctx, channelID, options...)
} else {
r2 = ret.Error(2)
}
return r0, r1, r2
}
type mockConstructorTestingTnewMockSlackClient interface {
mock.TestingT
Cleanup(func())
}
// newMockSlackClient creates a new instance of mockSlackClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func newMockSlackClient(t mockConstructorTestingTnewMockSlackClient) *mockSlackClient {
mock := &mockSlackClient{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}