// Code generated by mockery. DO NOT EDIT.

package example_project_test

import (
	mock "github.com/stretchr/testify/mock"
	foo "github.com/vektra/mockery/v2/pkg/fixtures/example_project/foo"
)

// MockRoot is an autogenerated mock type for the Root type
type MockRoot struct {
	mock.Mock
}

type MockRoot_Expecter struct {
	mock *mock.Mock
}

func (_m *MockRoot) EXPECT() *MockRoot_Expecter {
	return &MockRoot_Expecter{mock: &_m.Mock}
}

// ReturnsFoo provides a mock function with no fields
func (_m *MockRoot) ReturnsFoo() (foo.Foo, error) {
	ret := _m.Called()

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

	var r0 foo.Foo
	var r1 error
	if rf, ok := ret.Get(0).(func() (foo.Foo, error)); ok {
		return rf()
	}
	if rf, ok := ret.Get(0).(func() foo.Foo); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(foo.Foo)
		}
	}

	if rf, ok := ret.Get(1).(func() error); ok {
		r1 = rf()
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// ReturnsFoo is a helper method to define mock.On call
func (_e *MockRoot_Expecter) ReturnsFoo() *MockRoot_ReturnsFoo_Call {
	return &MockRoot_ReturnsFoo_Call{Call: _e.mock.On("ReturnsFoo")}
}

func (_c *MockRoot_ReturnsFoo_Call) Run(run func()) *MockRoot_ReturnsFoo_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *MockRoot_ReturnsFoo_Call) Return(_a0 foo.Foo, _a1 error) *MockRoot_ReturnsFoo_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockRoot_ReturnsFoo_Call) RunAndReturn(run func() (foo.Foo, error)) *MockRoot_ReturnsFoo_Call {
	_c.Call.Return(run)
	return _c
}

// TakesBaz provides a mock function with given fields: _a0
func (_m *MockRoot) TakesBaz(_a0 *foo.Baz) {
	_m.Called(_a0)
}

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

// TakesBaz is a helper method to define mock.On call
//   - _a0 *foo.Baz
func (_e *MockRoot_Expecter) TakesBaz(_a0 interface{}) *MockRoot_TakesBaz_Call {
	return &MockRoot_TakesBaz_Call{Call: _e.mock.On("TakesBaz", _a0)}
}

func (_c *MockRoot_TakesBaz_Call) Run(run func(_a0 *foo.Baz)) *MockRoot_TakesBaz_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(*foo.Baz))
	})
	return _c
}

func (_c *MockRoot_TakesBaz_Call) Return() *MockRoot_TakesBaz_Call {
	_c.Call.Return()
	return _c
}

func (_c *MockRoot_TakesBaz_Call) RunAndReturn(run func(*foo.Baz)) *MockRoot_TakesBaz_Call {
	_c.Run(run)
	return _c
}

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

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

	return mock
}
