// Code generated by mockery. DO NOT EDIT.

package mocks

import (
	db "github.com/agglayer/aggkit/aggsender/db"
	mock "github.com/stretchr/testify/mock"

	types "github.com/agglayer/aggkit/db/types"
)

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

type StorageRetainCertificatesPolicier_Expecter struct {
	mock *mock.Mock
}

func (_m *StorageRetainCertificatesPolicier) EXPECT() *StorageRetainCertificatesPolicier_Expecter {
	return &StorageRetainCertificatesPolicier_Expecter{mock: &_m.Mock}
}

// OnNewCert provides a mock function with given fields: tx, storage, certKey
func (_m *StorageRetainCertificatesPolicier) OnNewCert(tx types.Querier, storage db.AggSenderStorageMaintainer, certKey db.CertificateKey) error {
	ret := _m.Called(tx, storage, certKey)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(types.Querier, db.AggSenderStorageMaintainer, db.CertificateKey) error); ok {
		r0 = rf(tx, storage, certKey)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// OnNewCert is a helper method to define mock.On call
//   - tx types.Querier
//   - storage db.AggSenderStorageMaintainer
//   - certKey db.CertificateKey
func (_e *StorageRetainCertificatesPolicier_Expecter) OnNewCert(tx interface{}, storage interface{}, certKey interface{}) *StorageRetainCertificatesPolicier_OnNewCert_Call {
	return &StorageRetainCertificatesPolicier_OnNewCert_Call{Call: _e.mock.On("OnNewCert", tx, storage, certKey)}
}

func (_c *StorageRetainCertificatesPolicier_OnNewCert_Call) Run(run func(tx types.Querier, storage db.AggSenderStorageMaintainer, certKey db.CertificateKey)) *StorageRetainCertificatesPolicier_OnNewCert_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(types.Querier), args[1].(db.AggSenderStorageMaintainer), args[2].(db.CertificateKey))
	})
	return _c
}

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

func (_c *StorageRetainCertificatesPolicier_OnNewCert_Call) RunAndReturn(run func(types.Querier, db.AggSenderStorageMaintainer, db.CertificateKey) error) *StorageRetainCertificatesPolicier_OnNewCert_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
