mirror of
https://github.com/nikoksr/notify.git
synced 2024-12-04 09:43:04 +02:00
62 lines
1.8 KiB
Go
62 lines
1.8 KiB
Go
// Code generated by mockery v2.20.0. 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
|
|
}
|
|
|
|
// 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...)
|
|
|
|
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
|
|
}
|
|
|
|
type mockConstructorTestingTnewMockDiscordSession interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}
|
|
|
|
// 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.
|
|
func newMockDiscordSession(t mockConstructorTestingTnewMockDiscordSession) *mockDiscordSession {
|
|
mock := &mockDiscordSession{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|