mirror of
https://github.com/hanzoai/notify.git
synced 2026-11-02 14:03:55 +00:00
110 lines
3.6 KiB
Go
110 lines
3.6 KiB
Go
// Code generated by mockery v2.43.2. DO NOT EDIT.
|
|
|
|
package discord
|
|
|
|
import (
|
|
discordgo "github.com/bwmarrin/discordgo"
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// mockdiscordSession is an autogenerated mock type for the discordSession type
|
|
type mockdiscordSession struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type mockdiscordSession_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *mockdiscordSession) EXPECT() *mockdiscordSession_Expecter {
|
|
return &mockdiscordSession_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// ChannelMessageSend provides a mock function with given fields: channelID, content, options
|
|
func (_m *mockdiscordSession) ChannelMessageSend(channelID string, content string, options ...discordgo.RequestOption) (*discordgo.Message, error) {
|
|
_va := make([]interface{}, len(options))
|
|
for _i := range options {
|
|
_va[_i] = options[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, channelID, content)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ChannelMessageSend")
|
|
}
|
|
|
|
var r0 *discordgo.Message
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string, string, ...discordgo.RequestOption) (*discordgo.Message, error)); ok {
|
|
return rf(channelID, content, options...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string, string, ...discordgo.RequestOption) *discordgo.Message); ok {
|
|
r0 = rf(channelID, content, options...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*discordgo.Message)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string, string, ...discordgo.RequestOption) error); ok {
|
|
r1 = rf(channelID, content, options...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// mockdiscordSession_ChannelMessageSend_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChannelMessageSend'
|
|
type mockdiscordSession_ChannelMessageSend_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ChannelMessageSend is a helper method to define mock.On call
|
|
// - channelID string
|
|
// - content string
|
|
// - options ...discordgo.RequestOption
|
|
func (_e *mockdiscordSession_Expecter) ChannelMessageSend(channelID interface{}, content interface{}, options ...interface{}) *mockdiscordSession_ChannelMessageSend_Call {
|
|
return &mockdiscordSession_ChannelMessageSend_Call{Call: _e.mock.On("ChannelMessageSend",
|
|
append([]interface{}{channelID, content}, options...)...)}
|
|
}
|
|
|
|
func (_c *mockdiscordSession_ChannelMessageSend_Call) Run(run func(channelID string, content string, options ...discordgo.RequestOption)) *mockdiscordSession_ChannelMessageSend_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]discordgo.RequestOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(discordgo.RequestOption)
|
|
}
|
|
}
|
|
run(args[0].(string), args[1].(string), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *mockdiscordSession_ChannelMessageSend_Call) Return(_a0 *discordgo.Message, _a1 error) *mockdiscordSession_ChannelMessageSend_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *mockdiscordSession_ChannelMessageSend_Call) RunAndReturn(run func(string, string, ...discordgo.RequestOption) (*discordgo.Message, error)) *mockdiscordSession_ChannelMessageSend_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// newMockdiscordSession creates a new instance of mockdiscordSession. 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 newMockdiscordSession(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *mockdiscordSession {
|
|
mock := &mockdiscordSession{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|