mirror of https://github.com/milvus-io/milvus.git
147 lines
3.5 KiB
Go
147 lines
3.5 KiB
Go
// Code generated by mockery v2.32.4. DO NOT EDIT.
|
|
|
|
package mocks
|
|
|
|
import mock "github.com/stretchr/testify/mock"
|
|
|
|
// TokenStream is an autogenerated mock type for the TokenStream type
|
|
type TokenStream struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type TokenStream_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *TokenStream) EXPECT() *TokenStream_Expecter {
|
|
return &TokenStream_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// Advance provides a mock function with given fields:
|
|
func (_m *TokenStream) Advance() bool {
|
|
ret := _m.Called()
|
|
|
|
var r0 bool
|
|
if rf, ok := ret.Get(0).(func() bool); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Get(0).(bool)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// TokenStream_Advance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Advance'
|
|
type TokenStream_Advance_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Advance is a helper method to define mock.On call
|
|
func (_e *TokenStream_Expecter) Advance() *TokenStream_Advance_Call {
|
|
return &TokenStream_Advance_Call{Call: _e.mock.On("Advance")}
|
|
}
|
|
|
|
func (_c *TokenStream_Advance_Call) Run(run func()) *TokenStream_Advance_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *TokenStream_Advance_Call) Return(_a0 bool) *TokenStream_Advance_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *TokenStream_Advance_Call) RunAndReturn(run func() bool) *TokenStream_Advance_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Destroy provides a mock function with given fields:
|
|
func (_m *TokenStream) Destroy() {
|
|
_m.Called()
|
|
}
|
|
|
|
// TokenStream_Destroy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Destroy'
|
|
type TokenStream_Destroy_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Destroy is a helper method to define mock.On call
|
|
func (_e *TokenStream_Expecter) Destroy() *TokenStream_Destroy_Call {
|
|
return &TokenStream_Destroy_Call{Call: _e.mock.On("Destroy")}
|
|
}
|
|
|
|
func (_c *TokenStream_Destroy_Call) Run(run func()) *TokenStream_Destroy_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *TokenStream_Destroy_Call) Return() *TokenStream_Destroy_Call {
|
|
_c.Call.Return()
|
|
return _c
|
|
}
|
|
|
|
func (_c *TokenStream_Destroy_Call) RunAndReturn(run func()) *TokenStream_Destroy_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Token provides a mock function with given fields:
|
|
func (_m *TokenStream) Token() string {
|
|
ret := _m.Called()
|
|
|
|
var r0 string
|
|
if rf, ok := ret.Get(0).(func() string); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// TokenStream_Token_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Token'
|
|
type TokenStream_Token_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Token is a helper method to define mock.On call
|
|
func (_e *TokenStream_Expecter) Token() *TokenStream_Token_Call {
|
|
return &TokenStream_Token_Call{Call: _e.mock.On("Token")}
|
|
}
|
|
|
|
func (_c *TokenStream_Token_Call) Run(run func()) *TokenStream_Token_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *TokenStream_Token_Call) Return(_a0 string) *TokenStream_Token_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *TokenStream_Token_Call) RunAndReturn(run func() string) *TokenStream_Token_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// NewTokenStream creates a new instance of TokenStream. 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 NewTokenStream(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *TokenStream {
|
|
mock := &TokenStream{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|