mirror of
https://github.com/hanzoai/notify.git
synced 2026-10-30 15:04:32 +00:00
108 lines
2.8 KiB
Go
108 lines
2.8 KiB
Go
// Code generated by mockery v2.43.2. DO NOT EDIT.
|
|
|
|
package googlechat
|
|
|
|
import (
|
|
mock "github.com/stretchr/testify/mock"
|
|
chat "google.golang.org/api/chat/v1"
|
|
googleapi "google.golang.org/api/googleapi"
|
|
)
|
|
|
|
// mockcallCreator is an autogenerated mock type for the callCreator type
|
|
type mockcallCreator struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type mockcallCreator_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *mockcallCreator) EXPECT() *mockcallCreator_Expecter {
|
|
return &mockcallCreator_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// Do provides a mock function with given fields: _a0
|
|
func (_m *mockcallCreator) Do(_a0 ...googleapi.CallOption) (*chat.Message, error) {
|
|
_va := make([]interface{}, len(_a0))
|
|
for _i := range _a0 {
|
|
_va[_i] = _a0[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Do")
|
|
}
|
|
|
|
var r0 *chat.Message
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(...googleapi.CallOption) (*chat.Message, error)); ok {
|
|
return rf(_a0...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(...googleapi.CallOption) *chat.Message); ok {
|
|
r0 = rf(_a0...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*chat.Message)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(...googleapi.CallOption) error); ok {
|
|
r1 = rf(_a0...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// mockcallCreator_Do_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Do'
|
|
type mockcallCreator_Do_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Do is a helper method to define mock.On call
|
|
// - _a0 ...googleapi.CallOption
|
|
func (_e *mockcallCreator_Expecter) Do(_a0 ...interface{}) *mockcallCreator_Do_Call {
|
|
return &mockcallCreator_Do_Call{Call: _e.mock.On("Do",
|
|
append([]interface{}{}, _a0...)...)}
|
|
}
|
|
|
|
func (_c *mockcallCreator_Do_Call) Run(run func(_a0 ...googleapi.CallOption)) *mockcallCreator_Do_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]googleapi.CallOption, len(args)-0)
|
|
for i, a := range args[0:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(googleapi.CallOption)
|
|
}
|
|
}
|
|
run(variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *mockcallCreator_Do_Call) Return(_a0 *chat.Message, _a1 error) *mockcallCreator_Do_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *mockcallCreator_Do_Call) RunAndReturn(run func(...googleapi.CallOption) (*chat.Message, error)) *mockcallCreator_Do_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// newMockcallCreator creates a new instance of mockcallCreator. 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 newMockcallCreator(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *mockcallCreator {
|
|
mock := &mockcallCreator{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|