// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery
// template: testify

package mocks

import (
	"github.com/aerospike/backup-go/models"
	mock "github.com/stretchr/testify/mock"
)

// NewMockDecoder creates a new instance of MockDecoder. 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 NewMockDecoder[T models.TokenConstraint](t interface {
	mock.TestingT
	Cleanup(func())
}) *MockDecoder[T] {
	mock := &MockDecoder[T]{}
	mock.Mock.Test(t)

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

	return mock
}

// MockDecoder is an autogenerated mock type for the Decoder type
type MockDecoder[T models.TokenConstraint] struct {
	mock.Mock
}

type MockDecoder_Expecter[T models.TokenConstraint] struct {
	mock *mock.Mock
}

func (_m *MockDecoder[T]) EXPECT() *MockDecoder_Expecter[T] {
	return &MockDecoder_Expecter[T]{mock: &_m.Mock}
}

// NextToken provides a mock function for the type MockDecoder
func (_mock *MockDecoder[T]) NextToken() (T, error) {
	ret := _mock.Called()

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

	var r0 T
	var r1 error
	if returnFunc, ok := ret.Get(0).(func() (T, error)); ok {
		return returnFunc()
	}
	if returnFunc, ok := ret.Get(0).(func() T); ok {
		r0 = returnFunc()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(T)
		}
	}
	if returnFunc, ok := ret.Get(1).(func() error); ok {
		r1 = returnFunc()
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

// MockDecoder_NextToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NextToken'
type MockDecoder_NextToken_Call[T models.TokenConstraint] struct {
	*mock.Call
}

// NextToken is a helper method to define mock.On call
func (_e *MockDecoder_Expecter[T]) NextToken() *MockDecoder_NextToken_Call[T] {
	return &MockDecoder_NextToken_Call[T]{Call: _e.mock.On("NextToken")}
}

func (_c *MockDecoder_NextToken_Call[T]) Run(run func()) *MockDecoder_NextToken_Call[T] {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *MockDecoder_NextToken_Call[T]) Return(v T, err error) *MockDecoder_NextToken_Call[T] {
	_c.Call.Return(v, err)
	return _c
}

func (_c *MockDecoder_NextToken_Call[T]) RunAndReturn(run func() (T, error)) *MockDecoder_NextToken_Call[T] {
	_c.Call.Return(run)
	return _c
}
