Files
mtusi2026lab5/internal/transport/rest/mocks/HealthChecker.go
T
2026-10-29 23:36:12 +03:00

99 lines
2.4 KiB
Go

// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery
// template: testify
package mocks
import (
"context"
mock "github.com/stretchr/testify/mock"
)
// NewMockHealthChecker creates a new instance of MockHealthChecker. 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 NewMockHealthChecker(t interface {
mock.TestingT
Cleanup(func())
}) *MockHealthChecker {
if helper, ok := t.(interface{ Helper() }); ok {
helper.Helper()
}
mock := &MockHealthChecker{}
mock.Mock.Test(t)
t.Cleanup(func() {
if helper, ok := t.(interface{ Helper() }); ok {
helper.Helper()
}
mock.AssertExpectations(t)
})
return mock
}
// MockHealthChecker is an autogenerated mock type for the HealthChecker type
type MockHealthChecker struct {
mock.Mock
}
type MockHealthChecker_Expecter struct {
mock *mock.Mock
}
func (_m *MockHealthChecker) EXPECT() *MockHealthChecker_Expecter {
return &MockHealthChecker_Expecter{mock: &_m.Mock}
}
// Ping provides a mock function for the type MockHealthChecker
func (_mock *MockHealthChecker) Ping(ctx context.Context) error {
ret := _mock.Called(ctx)
if len(ret) == 0 {
panic("no return value specified for Ping")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
r0 = returnFunc(ctx)
} else {
r0 = ret.Error(0)
}
return r0
}
// MockHealthChecker_Ping_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ping'
type MockHealthChecker_Ping_Call struct {
*mock.Call
}
// Ping is a helper method to define mock.On call
// - ctx context.Context
func (_e *MockHealthChecker_Expecter) Ping(ctx any) *MockHealthChecker_Ping_Call {
return &MockHealthChecker_Ping_Call{Call: _e.mock.On("Ping", ctx)}
}
func (_c *MockHealthChecker_Ping_Call) Run(run func(ctx context.Context)) *MockHealthChecker_Ping_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 context.Context
if args[0] != nil {
arg0 = args[0].(context.Context)
}
run(
arg0,
)
})
return _c
}
func (_c *MockHealthChecker_Ping_Call) Return(err error) *MockHealthChecker_Ping_Call {
_c.Call.Return(err)
return _c
}
func (_c *MockHealthChecker_Ping_Call) RunAndReturn(run func(ctx context.Context) error) *MockHealthChecker_Ping_Call {
_c.Call.Return(run)
return _c
}