forked from nikoksr/notify
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmock_teams_client.go
60 lines (46 loc) · 1.62 KB
/
mock_teams_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
// Code generated by mockery v2.14.0. DO NOT EDIT.
package msteams
import (
context "context"
goteamsnotify "github.com/atc0005/go-teams-notify/v2"
mock "github.com/stretchr/testify/mock"
)
// mockTeamsClient is an autogenerated mock type for the teamsClient type
type mockTeamsClient struct {
mock.Mock
}
// SendWithContext provides a mock function with given fields: ctx, webhookURL, webhookMessage
func (_m *mockTeamsClient) SendWithContext(ctx context.Context, webhookURL string, webhookMessage goteamsnotify.MessageCard) error {
ret := _m.Called(ctx, webhookURL, webhookMessage)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, goteamsnotify.MessageCard) error); ok {
r0 = rf(ctx, webhookURL, webhookMessage)
} else {
r0 = ret.Error(0)
}
return r0
}
// SkipWebhookURLValidationOnSend provides a mock function with given fields: skip
func (_m *mockTeamsClient) SkipWebhookURLValidationOnSend(skip bool) goteamsnotify.API {
ret := _m.Called(skip)
var r0 goteamsnotify.API
if rf, ok := ret.Get(0).(func(bool) goteamsnotify.API); ok {
r0 = rf(skip)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(goteamsnotify.API)
}
}
return r0
}
type mockConstructorTestingTnewMockTeamsClient interface {
mock.TestingT
Cleanup(func())
}
// newMockTeamsClient creates a new instance of mockTeamsClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func newMockTeamsClient(t mockConstructorTestingTnewMockTeamsClient) *mockTeamsClient {
mock := &mockTeamsClient{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}