// Code generated by mockery. DO NOT EDIT.

package mocks

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

// GenericSubscriber is an autogenerated mock type for the GenericSubscriber type
type GenericSubscriber[T interface{}] struct {
	mock.Mock
}

type GenericSubscriber_Expecter[T interface{}] struct {
	mock *mock.Mock
}

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

// Publish provides a mock function with given fields: data
func (_m *GenericSubscriber[T]) Publish(data T) {
	_m.Called(data)
}

// GenericSubscriber_Publish_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Publish'
type GenericSubscriber_Publish_Call[T interface{}] struct {
	*mock.Call
}

// Publish is a helper method to define mock.On call
//   - data T
func (_e *GenericSubscriber_Expecter[T]) Publish(data interface{}) *GenericSubscriber_Publish_Call[T] {
	return &GenericSubscriber_Publish_Call[T]{Call: _e.mock.On("Publish", data)}
}

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

func (_c *GenericSubscriber_Publish_Call[T]) Return() *GenericSubscriber_Publish_Call[T] {
	_c.Call.Return()
	return _c
}

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

// Subscribe provides a mock function with given fields: subscriberName
func (_m *GenericSubscriber[T]) Subscribe(subscriberName string) <-chan T {
	ret := _m.Called(subscriberName)

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

	var r0 <-chan T
	if rf, ok := ret.Get(0).(func(string) <-chan T); ok {
		r0 = rf(subscriberName)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(<-chan T)
		}
	}

	return r0
}

// GenericSubscriber_Subscribe_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Subscribe'
type GenericSubscriber_Subscribe_Call[T interface{}] struct {
	*mock.Call
}

// Subscribe is a helper method to define mock.On call
//   - subscriberName string
func (_e *GenericSubscriber_Expecter[T]) Subscribe(subscriberName interface{}) *GenericSubscriber_Subscribe_Call[T] {
	return &GenericSubscriber_Subscribe_Call[T]{Call: _e.mock.On("Subscribe", subscriberName)}
}

func (_c *GenericSubscriber_Subscribe_Call[T]) Run(run func(subscriberName string)) *GenericSubscriber_Subscribe_Call[T] {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(string))
	})
	return _c
}

func (_c *GenericSubscriber_Subscribe_Call[T]) Return(_a0 <-chan T) *GenericSubscriber_Subscribe_Call[T] {
	_c.Call.Return(_a0)
	return _c
}

func (_c *GenericSubscriber_Subscribe_Call[T]) RunAndReturn(run func(string) <-chan T) *GenericSubscriber_Subscribe_Call[T] {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
