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

package ca_chain

import (
	x509 "crypto/x509"

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

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

type mockDecoder_Expecter struct {
	mock *mock.Mock
}

func (_m *mockDecoder) EXPECT() *mockDecoder_Expecter {
	return &mockDecoder_Expecter{mock: &_m.Mock}
}

// Execute provides a mock function with given fields: data
func (_m *mockDecoder) Execute(data []byte) (*x509.Certificate, error) {
	ret := _m.Called(data)

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

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

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

	return r0, r1
}

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

// Execute is a helper method to define mock.On call
//   - data []byte
func (_e *mockDecoder_Expecter) Execute(data interface{}) *mockDecoder_Execute_Call {
	return &mockDecoder_Execute_Call{Call: _e.mock.On("Execute", data)}
}

func (_c *mockDecoder_Execute_Call) Run(run func(data []byte)) *mockDecoder_Execute_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].([]byte))
	})
	return _c
}

func (_c *mockDecoder_Execute_Call) Return(_a0 *x509.Certificate, _a1 error) *mockDecoder_Execute_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

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

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

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

	return mock
}
