// Code generated by mockery v2.40.1. DO NOT EDIT.

package mocks

import (
	common "github.com/hyperledger/fabric-protos-go-apiv2/common"
	mock "github.com/stretchr/testify/mock"
)

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

type ConfigValidator_Expecter struct {
	mock *mock.Mock
}

func (_m *ConfigValidator) EXPECT() *ConfigValidator_Expecter {
	return &ConfigValidator_Expecter{mock: &_m.Mock}
}

// ValidateConfig provides a mock function with given fields: env
func (_m *ConfigValidator) ValidateConfig(env *common.Envelope) error {
	ret := _m.Called(env)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(*common.Envelope) error); ok {
		r0 = rf(env)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// ValidateConfig is a helper method to define mock.On call
//   - env *common.Envelope
func (_e *ConfigValidator_Expecter) ValidateConfig(env interface{}) *ConfigValidator_ValidateConfig_Call {
	return &ConfigValidator_ValidateConfig_Call{Call: _e.mock.On("ValidateConfig", env)}
}

func (_c *ConfigValidator_ValidateConfig_Call) Run(run func(env *common.Envelope)) *ConfigValidator_ValidateConfig_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(*common.Envelope))
	})
	return _c
}

func (_c *ConfigValidator_ValidateConfig_Call) Return(_a0 error) *ConfigValidator_ValidateConfig_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *ConfigValidator_ValidateConfig_Call) RunAndReturn(run func(*common.Envelope) error) *ConfigValidator_ValidateConfig_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
