mirror of
https://github.com/grafana/grafana.git
synced 2025-08-01 22:32:24 +08:00
268 lines
5.8 KiB
Go
268 lines
5.8 KiB
Go
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
|
|
|
package mocks
|
|
|
|
import mock "github.com/stretchr/testify/mock"
|
|
|
|
// Rows is an autogenerated mock type for the Rows type
|
|
type Rows struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type Rows_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *Rows) EXPECT() *Rows_Expecter {
|
|
return &Rows_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// Close provides a mock function with no fields
|
|
func (_m *Rows) Close() error {
|
|
ret := _m.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Close")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func() error); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Rows_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
|
|
type Rows_Close_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Close is a helper method to define mock.On call
|
|
func (_e *Rows_Expecter) Close() *Rows_Close_Call {
|
|
return &Rows_Close_Call{Call: _e.mock.On("Close")}
|
|
}
|
|
|
|
func (_c *Rows_Close_Call) Run(run func()) *Rows_Close_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Rows_Close_Call) Return(_a0 error) *Rows_Close_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Rows_Close_Call) RunAndReturn(run func() error) *Rows_Close_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Err provides a mock function with no fields
|
|
func (_m *Rows) Err() error {
|
|
ret := _m.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Err")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func() error); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Rows_Err_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Err'
|
|
type Rows_Err_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Err is a helper method to define mock.On call
|
|
func (_e *Rows_Expecter) Err() *Rows_Err_Call {
|
|
return &Rows_Err_Call{Call: _e.mock.On("Err")}
|
|
}
|
|
|
|
func (_c *Rows_Err_Call) Run(run func()) *Rows_Err_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Rows_Err_Call) Return(_a0 error) *Rows_Err_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Rows_Err_Call) RunAndReturn(run func() error) *Rows_Err_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Next provides a mock function with no fields
|
|
func (_m *Rows) Next() bool {
|
|
ret := _m.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Next")
|
|
}
|
|
|
|
var r0 bool
|
|
if rf, ok := ret.Get(0).(func() bool); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Get(0).(bool)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Rows_Next_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Next'
|
|
type Rows_Next_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Next is a helper method to define mock.On call
|
|
func (_e *Rows_Expecter) Next() *Rows_Next_Call {
|
|
return &Rows_Next_Call{Call: _e.mock.On("Next")}
|
|
}
|
|
|
|
func (_c *Rows_Next_Call) Run(run func()) *Rows_Next_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Rows_Next_Call) Return(_a0 bool) *Rows_Next_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Rows_Next_Call) RunAndReturn(run func() bool) *Rows_Next_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// NextResultSet provides a mock function with no fields
|
|
func (_m *Rows) NextResultSet() bool {
|
|
ret := _m.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for NextResultSet")
|
|
}
|
|
|
|
var r0 bool
|
|
if rf, ok := ret.Get(0).(func() bool); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Get(0).(bool)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Rows_NextResultSet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NextResultSet'
|
|
type Rows_NextResultSet_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// NextResultSet is a helper method to define mock.On call
|
|
func (_e *Rows_Expecter) NextResultSet() *Rows_NextResultSet_Call {
|
|
return &Rows_NextResultSet_Call{Call: _e.mock.On("NextResultSet")}
|
|
}
|
|
|
|
func (_c *Rows_NextResultSet_Call) Run(run func()) *Rows_NextResultSet_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Rows_NextResultSet_Call) Return(_a0 bool) *Rows_NextResultSet_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Rows_NextResultSet_Call) RunAndReturn(run func() bool) *Rows_NextResultSet_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Scan provides a mock function with given fields: dest
|
|
func (_m *Rows) Scan(dest ...interface{}) error {
|
|
var _ca []interface{}
|
|
_ca = append(_ca, dest...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Scan")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(...interface{}) error); ok {
|
|
r0 = rf(dest...)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Rows_Scan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Scan'
|
|
type Rows_Scan_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Scan is a helper method to define mock.On call
|
|
// - dest ...interface{}
|
|
func (_e *Rows_Expecter) Scan(dest ...interface{}) *Rows_Scan_Call {
|
|
return &Rows_Scan_Call{Call: _e.mock.On("Scan",
|
|
append([]interface{}{}, dest...)...)}
|
|
}
|
|
|
|
func (_c *Rows_Scan_Call) Run(run func(dest ...interface{})) *Rows_Scan_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]interface{}, len(args)-0)
|
|
for i, a := range args[0:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(interface{})
|
|
}
|
|
}
|
|
run(variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Rows_Scan_Call) Return(_a0 error) *Rows_Scan_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Rows_Scan_Call) RunAndReturn(run func(...interface{}) error) *Rows_Scan_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// NewRows creates a new instance of Rows. 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 NewRows(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *Rows {
|
|
mock := &Rows{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|