// Code generated by mockery v2.13.0-beta.1. DO NOT EDIT.

package utility

import (
	context "context"

	centchain "github.com/centrifuge/pod/centchain"

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

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

// BatchAll provides a mock function with given fields: ctx, callProviderFns
func (_m *APIMock) BatchAll(ctx context.Context, callProviderFns ...centchain.CallProviderFn) (*centchain.ExtrinsicInfo, error) {
	_va := make([]interface{}, len(callProviderFns))
	for _i := range callProviderFns {
		_va[_i] = callProviderFns[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, ctx)
	_ca = append(_ca, _va...)
	ret := _m.Called(_ca...)

	var r0 *centchain.ExtrinsicInfo
	if rf, ok := ret.Get(0).(func(context.Context, ...centchain.CallProviderFn) *centchain.ExtrinsicInfo); ok {
		r0 = rf(ctx, callProviderFns...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*centchain.ExtrinsicInfo)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, ...centchain.CallProviderFn) error); ok {
		r1 = rf(ctx, callProviderFns...)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

type NewAPIMockT interface {
	mock.TestingT
	Cleanup(func())
}

// NewAPIMock creates a new instance of APIMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewAPIMock(t NewAPIMockT) *APIMock {
	mock := &APIMock{}
	mock.Mock.Test(t)

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

	return mock
}
