// Code generated by mockery. DO NOT EDIT.

package mock_l2_shared

import (
	context "context"

	l2_shared "github.com/0xPolygonHermez/zkevm-node/synchronizer/l2_sync/l2_shared"
	mock "github.com/stretchr/testify/mock"

	pgx "github.com/jackc/pgx/v4"

	types "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types"
)

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

type BatchProcessor_Expecter struct {
	mock *mock.Mock
}

func (_m *BatchProcessor) EXPECT() *BatchProcessor_Expecter {
	return &BatchProcessor_Expecter{mock: &_m.Mock}
}

// ProcessTrustedBatch provides a mock function with given fields: ctx, trustedBatch, status, dbTx, debugPrefix
func (_m *BatchProcessor) ProcessTrustedBatch(ctx context.Context, trustedBatch *types.Batch, status l2_shared.TrustedState, dbTx pgx.Tx, debugPrefix string) (*l2_shared.TrustedState, error) {
	ret := _m.Called(ctx, trustedBatch, status, dbTx, debugPrefix)

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

	var r0 *l2_shared.TrustedState
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *types.Batch, l2_shared.TrustedState, pgx.Tx, string) (*l2_shared.TrustedState, error)); ok {
		return rf(ctx, trustedBatch, status, dbTx, debugPrefix)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *types.Batch, l2_shared.TrustedState, pgx.Tx, string) *l2_shared.TrustedState); ok {
		r0 = rf(ctx, trustedBatch, status, dbTx, debugPrefix)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*l2_shared.TrustedState)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *types.Batch, l2_shared.TrustedState, pgx.Tx, string) error); ok {
		r1 = rf(ctx, trustedBatch, status, dbTx, debugPrefix)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// ProcessTrustedBatch is a helper method to define mock.On call
//   - ctx context.Context
//   - trustedBatch *types.Batch
//   - status l2_shared.TrustedState
//   - dbTx pgx.Tx
//   - debugPrefix string
func (_e *BatchProcessor_Expecter) ProcessTrustedBatch(ctx interface{}, trustedBatch interface{}, status interface{}, dbTx interface{}, debugPrefix interface{}) *BatchProcessor_ProcessTrustedBatch_Call {
	return &BatchProcessor_ProcessTrustedBatch_Call{Call: _e.mock.On("ProcessTrustedBatch", ctx, trustedBatch, status, dbTx, debugPrefix)}
}

func (_c *BatchProcessor_ProcessTrustedBatch_Call) Run(run func(ctx context.Context, trustedBatch *types.Batch, status l2_shared.TrustedState, dbTx pgx.Tx, debugPrefix string)) *BatchProcessor_ProcessTrustedBatch_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(*types.Batch), args[2].(l2_shared.TrustedState), args[3].(pgx.Tx), args[4].(string))
	})
	return _c
}

func (_c *BatchProcessor_ProcessTrustedBatch_Call) Return(_a0 *l2_shared.TrustedState, _a1 error) *BatchProcessor_ProcessTrustedBatch_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *BatchProcessor_ProcessTrustedBatch_Call) RunAndReturn(run func(context.Context, *types.Batch, l2_shared.TrustedState, pgx.Tx, string) (*l2_shared.TrustedState, error)) *BatchProcessor_ProcessTrustedBatch_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
