1
0
mirror of https://codeberg.org/crowci/crow.git synced 2025-06-07 01:21:05 +03:00
crow/pipeline/mocks/mock_Logger.go
2025-03-10 13:58:57 +01:00

86 lines
2.1 KiB
Go

// Code generated by mockery v2.53.0. DO NOT EDIT.
package pipeline
import (
io "io"
mock "github.com/stretchr/testify/mock"
types "codeberg.org/crowci/crow/v3/pipeline/backend/types"
)
// MockLogger is an autogenerated mock type for the Logger type
type MockLogger struct {
mock.Mock
}
type MockLogger_Expecter struct {
mock *mock.Mock
}
func (_m *MockLogger) EXPECT() *MockLogger_Expecter {
return &MockLogger_Expecter{mock: &_m.Mock}
}
// Execute provides a mock function with given fields: _a0, _a1
func (_m *MockLogger) Execute(_a0 *types.Step, _a1 io.ReadCloser) error {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for Execute")
}
var r0 error
if rf, ok := ret.Get(0).(func(*types.Step, io.ReadCloser) error); ok {
r0 = rf(_a0, _a1)
} else {
r0 = ret.Error(0)
}
return r0
}
// MockLogger_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute'
type MockLogger_Execute_Call struct {
*mock.Call
}
// Execute is a helper method to define mock.On call
// - _a0 *types.Step
// - _a1 io.ReadCloser
func (_e *MockLogger_Expecter) Execute(_a0 interface{}, _a1 interface{}) *MockLogger_Execute_Call {
return &MockLogger_Execute_Call{Call: _e.mock.On("Execute", _a0, _a1)}
}
func (_c *MockLogger_Execute_Call) Run(run func(_a0 *types.Step, _a1 io.ReadCloser)) *MockLogger_Execute_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(*types.Step), args[1].(io.ReadCloser))
})
return _c
}
func (_c *MockLogger_Execute_Call) Return(_a0 error) *MockLogger_Execute_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockLogger_Execute_Call) RunAndReturn(run func(*types.Step, io.ReadCloser) error) *MockLogger_Execute_Call {
_c.Call.Return(run)
return _c
}
// NewMockLogger creates a new instance of MockLogger. 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 NewMockLogger(t interface {
mock.TestingT
Cleanup(func())
}) *MockLogger {
mock := &MockLogger{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}