// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery
// template: testify

package mocks

import (
	mock "github.com/stretchr/testify/mock"
	"go.woodpecker-ci.org/woodpecker/v3/pipeline/state"
)

// NewMockTracer creates a new instance of MockTracer. 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 NewMockTracer(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockTracer {
	mock := &MockTracer{}
	mock.Mock.Test(t)

	t.Cleanup(func() { mock.AssertExpectations(t) })

	return mock
}

// MockTracer is an autogenerated mock type for the Tracer type
type MockTracer struct {
	mock.Mock
}

type MockTracer_Expecter struct {
	mock *mock.Mock
}

func (_m *MockTracer) EXPECT() *MockTracer_Expecter {
	return &MockTracer_Expecter{mock: &_m.Mock}
}

// Trace provides a mock function for the type MockTracer
func (_mock *MockTracer) Trace(state1 *state.State) error {
	ret := _mock.Called(state1)

	if len(ret) == 0 {
		panic("no return value specified for Trace")
	}

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(*state.State) error); ok {
		r0 = returnFunc(state1)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

// MockTracer_Trace_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Trace'
type MockTracer_Trace_Call struct {
	*mock.Call
}

// Trace is a helper method to define mock.On call
//   - state1 *state.State
func (_e *MockTracer_Expecter) Trace(state1 interface{}) *MockTracer_Trace_Call {
	return &MockTracer_Trace_Call{Call: _e.mock.On("Trace", state1)}
}

func (_c *MockTracer_Trace_Call) Run(run func(state1 *state.State)) *MockTracer_Trace_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 *state.State
		if args[0] != nil {
			arg0 = args[0].(*state.State)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *MockTracer_Trace_Call) Return(err error) *MockTracer_Trace_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *MockTracer_Trace_Call) RunAndReturn(run func(state1 *state.State) error) *MockTracer_Trace_Call {
	_c.Call.Return(run)
	return _c
}
