mirror of
https://github.com/hanzoai/notify.git
synced 2026-10-30 15:04:32 +00:00
232 lines
7.4 KiB
Go
232 lines
7.4 KiB
Go
// Code generated by mockery v2.50.4. DO NOT EDIT.
|
|
|
|
package msteams
|
|
|
|
import (
|
|
context "context"
|
|
http "net/http"
|
|
|
|
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
|
|
}
|
|
|
|
type mockteamsClient_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *mockteamsClient) EXPECT() *mockteamsClient_Expecter {
|
|
return &mockteamsClient_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// SendWithContext provides a mock function with given fields: ctx, webhookURL, message
|
|
func (_m *mockteamsClient) SendWithContext(ctx context.Context, webhookURL string, message goteamsnotify.TeamsMessage) error {
|
|
ret := _m.Called(ctx, webhookURL, message)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SendWithContext")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, goteamsnotify.TeamsMessage) error); ok {
|
|
r0 = rf(ctx, webhookURL, message)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// mockteamsClient_SendWithContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendWithContext'
|
|
type mockteamsClient_SendWithContext_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// SendWithContext is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - webhookURL string
|
|
// - message goteamsnotify.TeamsMessage
|
|
func (_e *mockteamsClient_Expecter) SendWithContext(ctx interface{}, webhookURL interface{}, message interface{}) *mockteamsClient_SendWithContext_Call {
|
|
return &mockteamsClient_SendWithContext_Call{Call: _e.mock.On("SendWithContext", ctx, webhookURL, message)}
|
|
}
|
|
|
|
func (_c *mockteamsClient_SendWithContext_Call) Run(run func(ctx context.Context, webhookURL string, message goteamsnotify.TeamsMessage)) *mockteamsClient_SendWithContext_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string), args[2].(goteamsnotify.TeamsMessage))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *mockteamsClient_SendWithContext_Call) Return(_a0 error) *mockteamsClient_SendWithContext_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *mockteamsClient_SendWithContext_Call) RunAndReturn(run func(context.Context, string, goteamsnotify.TeamsMessage) error) *mockteamsClient_SendWithContext_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// SetHTTPClient provides a mock function with given fields: httpClient
|
|
func (_m *mockteamsClient) SetHTTPClient(httpClient *http.Client) *goteamsnotify.TeamsClient {
|
|
ret := _m.Called(httpClient)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SetHTTPClient")
|
|
}
|
|
|
|
var r0 *goteamsnotify.TeamsClient
|
|
if rf, ok := ret.Get(0).(func(*http.Client) *goteamsnotify.TeamsClient); ok {
|
|
r0 = rf(httpClient)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*goteamsnotify.TeamsClient)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// mockteamsClient_SetHTTPClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHTTPClient'
|
|
type mockteamsClient_SetHTTPClient_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// SetHTTPClient is a helper method to define mock.On call
|
|
// - httpClient *http.Client
|
|
func (_e *mockteamsClient_Expecter) SetHTTPClient(httpClient interface{}) *mockteamsClient_SetHTTPClient_Call {
|
|
return &mockteamsClient_SetHTTPClient_Call{Call: _e.mock.On("SetHTTPClient", httpClient)}
|
|
}
|
|
|
|
func (_c *mockteamsClient_SetHTTPClient_Call) Run(run func(httpClient *http.Client)) *mockteamsClient_SetHTTPClient_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(*http.Client))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *mockteamsClient_SetHTTPClient_Call) Return(_a0 *goteamsnotify.TeamsClient) *mockteamsClient_SetHTTPClient_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *mockteamsClient_SetHTTPClient_Call) RunAndReturn(run func(*http.Client) *goteamsnotify.TeamsClient) *mockteamsClient_SetHTTPClient_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// SetUserAgent provides a mock function with given fields: userAgent
|
|
func (_m *mockteamsClient) SetUserAgent(userAgent string) *goteamsnotify.TeamsClient {
|
|
ret := _m.Called(userAgent)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SetUserAgent")
|
|
}
|
|
|
|
var r0 *goteamsnotify.TeamsClient
|
|
if rf, ok := ret.Get(0).(func(string) *goteamsnotify.TeamsClient); ok {
|
|
r0 = rf(userAgent)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*goteamsnotify.TeamsClient)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// mockteamsClient_SetUserAgent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetUserAgent'
|
|
type mockteamsClient_SetUserAgent_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// SetUserAgent is a helper method to define mock.On call
|
|
// - userAgent string
|
|
func (_e *mockteamsClient_Expecter) SetUserAgent(userAgent interface{}) *mockteamsClient_SetUserAgent_Call {
|
|
return &mockteamsClient_SetUserAgent_Call{Call: _e.mock.On("SetUserAgent", userAgent)}
|
|
}
|
|
|
|
func (_c *mockteamsClient_SetUserAgent_Call) Run(run func(userAgent string)) *mockteamsClient_SetUserAgent_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *mockteamsClient_SetUserAgent_Call) Return(_a0 *goteamsnotify.TeamsClient) *mockteamsClient_SetUserAgent_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *mockteamsClient_SetUserAgent_Call) RunAndReturn(run func(string) *goteamsnotify.TeamsClient) *mockteamsClient_SetUserAgent_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// SkipWebhookURLValidationOnSend provides a mock function with given fields: skip
|
|
func (_m *mockteamsClient) SkipWebhookURLValidationOnSend(skip bool) *goteamsnotify.TeamsClient {
|
|
ret := _m.Called(skip)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SkipWebhookURLValidationOnSend")
|
|
}
|
|
|
|
var r0 *goteamsnotify.TeamsClient
|
|
if rf, ok := ret.Get(0).(func(bool) *goteamsnotify.TeamsClient); ok {
|
|
r0 = rf(skip)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*goteamsnotify.TeamsClient)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// mockteamsClient_SkipWebhookURLValidationOnSend_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SkipWebhookURLValidationOnSend'
|
|
type mockteamsClient_SkipWebhookURLValidationOnSend_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// SkipWebhookURLValidationOnSend is a helper method to define mock.On call
|
|
// - skip bool
|
|
func (_e *mockteamsClient_Expecter) SkipWebhookURLValidationOnSend(skip interface{}) *mockteamsClient_SkipWebhookURLValidationOnSend_Call {
|
|
return &mockteamsClient_SkipWebhookURLValidationOnSend_Call{Call: _e.mock.On("SkipWebhookURLValidationOnSend", skip)}
|
|
}
|
|
|
|
func (_c *mockteamsClient_SkipWebhookURLValidationOnSend_Call) Run(run func(skip bool)) *mockteamsClient_SkipWebhookURLValidationOnSend_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(bool))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *mockteamsClient_SkipWebhookURLValidationOnSend_Call) Return(_a0 *goteamsnotify.TeamsClient) *mockteamsClient_SkipWebhookURLValidationOnSend_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *mockteamsClient_SkipWebhookURLValidationOnSend_Call) RunAndReturn(run func(bool) *goteamsnotify.TeamsClient) *mockteamsClient_SkipWebhookURLValidationOnSend_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// 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.
|
|
// The first argument is typically a *testing.T value.
|
|
func newMockteamsClient(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *mockteamsClient {
|
|
mock := &mockteamsClient{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|