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

package anchors

import (
	context "context"
	time "time"

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

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

// CommitAnchor provides a mock function with given fields: ctx, anchorID, documentRoot, proof
func (_m *APIMock) CommitAnchor(ctx context.Context, anchorID AnchorID, documentRoot DocumentRoot, proof [32]byte) error {
	ret := _m.Called(ctx, anchorID, documentRoot, proof)

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, AnchorID, DocumentRoot, [32]byte) error); ok {
		r0 = rf(ctx, anchorID, documentRoot, proof)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// GetAnchorData provides a mock function with given fields: anchorID
func (_m *APIMock) GetAnchorData(anchorID AnchorID) (DocumentRoot, time.Time, error) {
	ret := _m.Called(anchorID)

	var r0 DocumentRoot
	if rf, ok := ret.Get(0).(func(AnchorID) DocumentRoot); ok {
		r0 = rf(anchorID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(DocumentRoot)
		}
	}

	var r1 time.Time
	if rf, ok := ret.Get(1).(func(AnchorID) time.Time); ok {
		r1 = rf(anchorID)
	} else {
		r1 = ret.Get(1).(time.Time)
	}

	var r2 error
	if rf, ok := ret.Get(2).(func(AnchorID) error); ok {
		r2 = rf(anchorID)
	} else {
		r2 = ret.Error(2)
	}

	return r0, r1, r2
}

// PreCommitAnchor provides a mock function with given fields: ctx, anchorID, signingRoot
func (_m *APIMock) PreCommitAnchor(ctx context.Context, anchorID AnchorID, signingRoot DocumentRoot) error {
	ret := _m.Called(ctx, anchorID, signingRoot)

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, AnchorID, DocumentRoot) error); ok {
		r0 = rf(ctx, anchorID, signingRoot)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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
}
