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

package ca_chain

import (
	"crypto/tls"
	"crypto/x509"

	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

// MockBuilder is an autogenerated mock type for the Builder type
type MockBuilder struct {
	mock.Mock
}

type MockBuilder_Expecter struct {
	mock *mock.Mock
}

func (_m *MockBuilder) EXPECT() *MockBuilder_Expecter {
	return &MockBuilder_Expecter{mock: &_m.Mock}
}

// BuildChainFromTLSConnectionState provides a mock function for the type MockBuilder
func (_mock *MockBuilder) BuildChainFromTLSConnectionState(TLS *tls.ConnectionState) error {
	ret := _mock.Called(TLS)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(*tls.ConnectionState) error); ok {
		r0 = returnFunc(TLS)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// BuildChainFromTLSConnectionState is a helper method to define mock.On call
//   - TLS *tls.ConnectionState
func (_e *MockBuilder_Expecter) BuildChainFromTLSConnectionState(TLS interface{}) *MockBuilder_BuildChainFromTLSConnectionState_Call {
	return &MockBuilder_BuildChainFromTLSConnectionState_Call{Call: _e.mock.On("BuildChainFromTLSConnectionState", TLS)}
}

func (_c *MockBuilder_BuildChainFromTLSConnectionState_Call) Run(run func(TLS *tls.ConnectionState)) *MockBuilder_BuildChainFromTLSConnectionState_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 *tls.ConnectionState
		if args[0] != nil {
			arg0 = args[0].(*tls.ConnectionState)
		}
		run(
			arg0,
		)
	})
	return _c
}

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

func (_c *MockBuilder_BuildChainFromTLSConnectionState_Call) RunAndReturn(run func(TLS *tls.ConnectionState) error) *MockBuilder_BuildChainFromTLSConnectionState_Call {
	_c.Call.Return(run)
	return _c
}

// String provides a mock function for the type MockBuilder
func (_mock *MockBuilder) String() string {
	ret := _mock.Called()

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

	var r0 string
	if returnFunc, ok := ret.Get(0).(func() string); ok {
		r0 = returnFunc()
	} else {
		r0 = ret.Get(0).(string)
	}
	return r0
}

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

// String is a helper method to define mock.On call
func (_e *MockBuilder_Expecter) String() *MockBuilder_String_Call {
	return &MockBuilder_String_Call{Call: _e.mock.On("String")}
}

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

func (_c *MockBuilder_String_Call) Return(s string) *MockBuilder_String_Call {
	_c.Call.Return(s)
	return _c
}

func (_c *MockBuilder_String_Call) RunAndReturn(run func() string) *MockBuilder_String_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}

// mockResolver is an autogenerated mock type for the resolver type
type mockResolver struct {
	mock.Mock
}

type mockResolver_Expecter struct {
	mock *mock.Mock
}

func (_m *mockResolver) EXPECT() *mockResolver_Expecter {
	return &mockResolver_Expecter{mock: &_m.Mock}
}

// Resolve provides a mock function for the type mockResolver
func (_mock *mockResolver) Resolve(certs []*x509.Certificate) ([]*x509.Certificate, error) {
	ret := _mock.Called(certs)

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

	var r0 []*x509.Certificate
	var r1 error
	if returnFunc, ok := ret.Get(0).(func([]*x509.Certificate) ([]*x509.Certificate, error)); ok {
		return returnFunc(certs)
	}
	if returnFunc, ok := ret.Get(0).(func([]*x509.Certificate) []*x509.Certificate); ok {
		r0 = returnFunc(certs)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*x509.Certificate)
		}
	}
	if returnFunc, ok := ret.Get(1).(func([]*x509.Certificate) error); ok {
		r1 = returnFunc(certs)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Resolve is a helper method to define mock.On call
//   - certs []*x509.Certificate
func (_e *mockResolver_Expecter) Resolve(certs interface{}) *mockResolver_Resolve_Call {
	return &mockResolver_Resolve_Call{Call: _e.mock.On("Resolve", certs)}
}

func (_c *mockResolver_Resolve_Call) Run(run func(certs []*x509.Certificate)) *mockResolver_Resolve_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 []*x509.Certificate
		if args[0] != nil {
			arg0 = args[0].([]*x509.Certificate)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *mockResolver_Resolve_Call) Return(certificates []*x509.Certificate, err error) *mockResolver_Resolve_Call {
	_c.Call.Return(certificates, err)
	return _c
}

func (_c *mockResolver_Resolve_Call) RunAndReturn(run func(certs []*x509.Certificate) ([]*x509.Certificate, error)) *mockResolver_Resolve_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}

// mockFetcher is an autogenerated mock type for the fetcher type
type mockFetcher struct {
	mock.Mock
}

type mockFetcher_Expecter struct {
	mock *mock.Mock
}

func (_m *mockFetcher) EXPECT() *mockFetcher_Expecter {
	return &mockFetcher_Expecter{mock: &_m.Mock}
}

// Fetch provides a mock function for the type mockFetcher
func (_mock *mockFetcher) Fetch(url string) ([]byte, error) {
	ret := _mock.Called(url)

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

	var r0 []byte
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(string) ([]byte, error)); ok {
		return returnFunc(url)
	}
	if returnFunc, ok := ret.Get(0).(func(string) []byte); ok {
		r0 = returnFunc(url)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]byte)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(string) error); ok {
		r1 = returnFunc(url)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Fetch is a helper method to define mock.On call
//   - url string
func (_e *mockFetcher_Expecter) Fetch(url interface{}) *mockFetcher_Fetch_Call {
	return &mockFetcher_Fetch_Call{Call: _e.mock.On("Fetch", url)}
}

func (_c *mockFetcher_Fetch_Call) Run(run func(url string)) *mockFetcher_Fetch_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 string
		if args[0] != nil {
			arg0 = args[0].(string)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *mockFetcher_Fetch_Call) Return(bytes []byte, err error) *mockFetcher_Fetch_Call {
	_c.Call.Return(bytes, err)
	return _c
}

func (_c *mockFetcher_Fetch_Call) RunAndReturn(run func(url string) ([]byte, error)) *mockFetcher_Fetch_Call {
	_c.Call.Return(run)
	return _c
}
