// Code generated by mockery v2.52.1. DO NOT EDIT.

package torznab_mocks

import (
	context "context"

	torznab "github.com/bitmagnet-io/bitmagnet/internal/torznab"
	mock "github.com/stretchr/testify/mock"
)

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

type Client_Expecter struct {
	mock *mock.Mock
}

func (_m *Client) EXPECT() *Client_Expecter {
	return &Client_Expecter{mock: &_m.Mock}
}

// Search provides a mock function with given fields: _a0, _a1
func (_m *Client) Search(_a0 context.Context, _a1 torznab.SearchRequest) (torznab.SearchResult, error) {
	ret := _m.Called(_a0, _a1)

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

	var r0 torznab.SearchResult
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, torznab.SearchRequest) (torznab.SearchResult, error)); ok {
		return rf(_a0, _a1)
	}
	if rf, ok := ret.Get(0).(func(context.Context, torznab.SearchRequest) torznab.SearchResult); ok {
		r0 = rf(_a0, _a1)
	} else {
		r0 = ret.Get(0).(torznab.SearchResult)
	}

	if rf, ok := ret.Get(1).(func(context.Context, torznab.SearchRequest) error); ok {
		r1 = rf(_a0, _a1)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// Search is a helper method to define mock.On call
//   - _a0 context.Context
//   - _a1 torznab.SearchRequest
func (_e *Client_Expecter) Search(_a0 interface{}, _a1 interface{}) *Client_Search_Call {
	return &Client_Search_Call{Call: _e.mock.On("Search", _a0, _a1)}
}

func (_c *Client_Search_Call) Run(run func(_a0 context.Context, _a1 torznab.SearchRequest)) *Client_Search_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(torznab.SearchRequest))
	})
	return _c
}

func (_c *Client_Search_Call) Return(_a0 torznab.SearchResult, _a1 error) *Client_Search_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *Client_Search_Call) RunAndReturn(run func(context.Context, torznab.SearchRequest) (torznab.SearchResult, error)) *Client_Search_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
