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

package certificate

import (
	"crypto/tls"

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

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

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

	return mock
}

// MockGenerator is an autogenerated mock type for the Generator type
type MockGenerator struct {
	mock.Mock
}

type MockGenerator_Expecter struct {
	mock *mock.Mock
}

func (_m *MockGenerator) EXPECT() *MockGenerator_Expecter {
	return &MockGenerator_Expecter{mock: &_m.Mock}
}

// Generate provides a mock function for the type MockGenerator
func (_mock *MockGenerator) Generate(host string) (tls.Certificate, []byte, error) {
	ret := _mock.Called(host)

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

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

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

// Generate is a helper method to define mock.On call
//   - host string
func (_e *MockGenerator_Expecter) Generate(host interface{}) *MockGenerator_Generate_Call {
	return &MockGenerator_Generate_Call{Call: _e.mock.On("Generate", host)}
}

func (_c *MockGenerator_Generate_Call) Run(run func(host string)) *MockGenerator_Generate_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 *MockGenerator_Generate_Call) Return(certificate tls.Certificate, bytes []byte, err error) *MockGenerator_Generate_Call {
	_c.Call.Return(certificate, bytes, err)
	return _c
}

func (_c *MockGenerator_Generate_Call) RunAndReturn(run func(host string) (tls.Certificate, []byte, error)) *MockGenerator_Generate_Call {
	_c.Call.Return(run)
	return _c
}
