c4c0b9bd32
added CI * onlywherenecessary * export * dockersocketoverride * disablecleanup * networkfromenv * fullsuite * ci * dockerhost * name * network * buildfirst * rm * caches * additionalcaches * additionalcaches * cachenix * nix * requiredprofile * nonixcache * nobuild * moremem * rmgomodules * buildfirst * faster * clean
84 lines
2.2 KiB
Go
84 lines
2.2 KiB
Go
// Code generated by mockery v2.52.3. DO NOT EDIT.
|
|
|
|
package runnermock
|
|
|
|
import (
|
|
context "context"
|
|
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// MockController is an autogenerated mock type for the Controller type
|
|
type MockController[B any] struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type MockController_Expecter[B any] struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *MockController[B]) EXPECT() *MockController_Expecter[B] {
|
|
return &MockController_Expecter[B]{mock: &_m.Mock}
|
|
}
|
|
|
|
// Process provides a mock function with given fields: ctx, body
|
|
func (_m *MockController[B]) Process(ctx context.Context, body B) bool {
|
|
ret := _m.Called(ctx, body)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Process")
|
|
}
|
|
|
|
var r0 bool
|
|
if rf, ok := ret.Get(0).(func(context.Context, B) bool); ok {
|
|
r0 = rf(ctx, body)
|
|
} else {
|
|
r0 = ret.Get(0).(bool)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// MockController_Process_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Process'
|
|
type MockController_Process_Call[B any] struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Process is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - body B
|
|
func (_e *MockController_Expecter[B]) Process(ctx interface{}, body interface{}) *MockController_Process_Call[B] {
|
|
return &MockController_Process_Call[B]{Call: _e.mock.On("Process", ctx, body)}
|
|
}
|
|
|
|
func (_c *MockController_Process_Call[B]) Run(run func(ctx context.Context, body B)) *MockController_Process_Call[B] {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(B))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockController_Process_Call[B]) Return(_a0 bool) *MockController_Process_Call[B] {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockController_Process_Call[B]) RunAndReturn(run func(context.Context, B) bool) *MockController_Process_Call[B] {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// NewMockController creates a new instance of MockController. 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 NewMockController[B any](t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *MockController[B] {
|
|
mock := &MockController[B]{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|