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

package mocks

import (
	"github.com/opencloud-eu/icap-client"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

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

type Scanner_Expecter struct {
	mock *mock.Mock
}

func (_m *Scanner) EXPECT() *Scanner_Expecter {
	return &Scanner_Expecter{mock: &_m.Mock}
}

// Do provides a mock function for the type Scanner
func (_mock *Scanner) Do(req icapclient.Request) (icapclient.Response, error) {
	ret := _mock.Called(req)

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

	var r0 icapclient.Response
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(icapclient.Request) (icapclient.Response, error)); ok {
		return returnFunc(req)
	}
	if returnFunc, ok := ret.Get(0).(func(icapclient.Request) icapclient.Response); ok {
		r0 = returnFunc(req)
	} else {
		r0 = ret.Get(0).(icapclient.Response)
	}
	if returnFunc, ok := ret.Get(1).(func(icapclient.Request) error); ok {
		r1 = returnFunc(req)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Do is a helper method to define mock.On call
//   - req icapclient.Request
func (_e *Scanner_Expecter) Do(req interface{}) *Scanner_Do_Call {
	return &Scanner_Do_Call{Call: _e.mock.On("Do", req)}
}

func (_c *Scanner_Do_Call) Run(run func(req icapclient.Request)) *Scanner_Do_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 icapclient.Request
		if args[0] != nil {
			arg0 = args[0].(icapclient.Request)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *Scanner_Do_Call) Return(response icapclient.Response, err error) *Scanner_Do_Call {
	_c.Call.Return(response, err)
	return _c
}

func (_c *Scanner_Do_Call) RunAndReturn(run func(req icapclient.Request) (icapclient.Response, error)) *Scanner_Do_Call {
	_c.Call.Return(run)
	return _c
}
