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

package indexmock

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

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

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

	return mock
}

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

type Indexer_Expecter struct {
	mock *mock.Mock
}

func (_m *Indexer) EXPECT() *Indexer_Expecter {
	return &Indexer_Expecter{mock: &_m.Mock}
}

// FromArgs provides a mock function for the type Indexer
func (_mock *Indexer) FromArgs(args ...interface{}) ([]byte, error) {
	var _ca []interface{}
	_ca = append(_ca, args...)
	ret := _mock.Called(_ca...)

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

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

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

// FromArgs is a helper method to define mock.On call
//   - args ...interface{}
func (_e *Indexer_Expecter) FromArgs(args ...interface{}) *Indexer_FromArgs_Call {
	return &Indexer_FromArgs_Call{Call: _e.mock.On("FromArgs",
		append([]interface{}{}, args...)...)}
}

func (_c *Indexer_FromArgs_Call) Run(run func(args ...interface{})) *Indexer_FromArgs_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 []interface{}
		variadicArgs := make([]interface{}, len(args)-0)
		for i, a := range args[0:] {
			if a != nil {
				variadicArgs[i] = a.(interface{})
			}
		}
		arg0 = variadicArgs
		run(
			arg0...,
		)
	})
	return _c
}

func (_c *Indexer_FromArgs_Call) Return(bytes []byte, err error) *Indexer_FromArgs_Call {
	_c.Call.Return(bytes, err)
	return _c
}

func (_c *Indexer_FromArgs_Call) RunAndReturn(run func(args ...interface{}) ([]byte, error)) *Indexer_FromArgs_Call {
	_c.Call.Return(run)
	return _c
}
