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

package ca_chain

import (
	pem "encoding/pem"
	io "io"

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

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

type mockPemEncoder_Expecter struct {
	mock *mock.Mock
}

func (_m *mockPemEncoder) EXPECT() *mockPemEncoder_Expecter {
	return &mockPemEncoder_Expecter{mock: &_m.Mock}
}

// Execute provides a mock function with given fields: out, b
func (_m *mockPemEncoder) Execute(out io.Writer, b *pem.Block) error {
	ret := _m.Called(out, b)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(io.Writer, *pem.Block) error); ok {
		r0 = rf(out, b)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// Execute is a helper method to define mock.On call
//   - out io.Writer
//   - b *pem.Block
func (_e *mockPemEncoder_Expecter) Execute(out interface{}, b interface{}) *mockPemEncoder_Execute_Call {
	return &mockPemEncoder_Execute_Call{Call: _e.mock.On("Execute", out, b)}
}

func (_c *mockPemEncoder_Execute_Call) Run(run func(out io.Writer, b *pem.Block)) *mockPemEncoder_Execute_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(io.Writer), args[1].(*pem.Block))
	})
	return _c
}

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

func (_c *mockPemEncoder_Execute_Call) RunAndReturn(run func(io.Writer, *pem.Block) error) *mockPemEncoder_Execute_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
