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

package mocks

import (
	"context"

	"github.com/eclipse/paho.golang/paho"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

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

type MockConnectionManager_Expecter struct {
	mock *mock.Mock
}

func (_m *MockConnectionManager) EXPECT() *MockConnectionManager_Expecter {
	return &MockConnectionManager_Expecter{mock: &_m.Mock}
}

// AwaitConnection provides a mock function for the type MockConnectionManager
func (_mock *MockConnectionManager) AwaitConnection(ctx context.Context) error {
	ret := _mock.Called(ctx)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
		r0 = returnFunc(ctx)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// AwaitConnection is a helper method to define mock.On call
//   - ctx context.Context
func (_e *MockConnectionManager_Expecter) AwaitConnection(ctx interface{}) *MockConnectionManager_AwaitConnection_Call {
	return &MockConnectionManager_AwaitConnection_Call{Call: _e.mock.On("AwaitConnection", ctx)}
}

func (_c *MockConnectionManager_AwaitConnection_Call) Run(run func(ctx context.Context)) *MockConnectionManager_AwaitConnection_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *MockConnectionManager_AwaitConnection_Call) Return(err error) *MockConnectionManager_AwaitConnection_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *MockConnectionManager_AwaitConnection_Call) RunAndReturn(run func(ctx context.Context) error) *MockConnectionManager_AwaitConnection_Call {
	_c.Call.Return(run)
	return _c
}

// Disconnect provides a mock function for the type MockConnectionManager
func (_mock *MockConnectionManager) Disconnect(ctx context.Context) error {
	ret := _mock.Called(ctx)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
		r0 = returnFunc(ctx)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// Disconnect is a helper method to define mock.On call
//   - ctx context.Context
func (_e *MockConnectionManager_Expecter) Disconnect(ctx interface{}) *MockConnectionManager_Disconnect_Call {
	return &MockConnectionManager_Disconnect_Call{Call: _e.mock.On("Disconnect", ctx)}
}

func (_c *MockConnectionManager_Disconnect_Call) Run(run func(ctx context.Context)) *MockConnectionManager_Disconnect_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *MockConnectionManager_Disconnect_Call) Return(err error) *MockConnectionManager_Disconnect_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *MockConnectionManager_Disconnect_Call) RunAndReturn(run func(ctx context.Context) error) *MockConnectionManager_Disconnect_Call {
	_c.Call.Return(run)
	return _c
}

// Publish provides a mock function for the type MockConnectionManager
func (_mock *MockConnectionManager) Publish(ctx context.Context, publish *paho.Publish) (*paho.PublishResponse, error) {
	ret := _mock.Called(ctx, publish)

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

	var r0 *paho.PublishResponse
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *paho.Publish) (*paho.PublishResponse, error)); ok {
		return returnFunc(ctx, publish)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, *paho.Publish) *paho.PublishResponse); ok {
		r0 = returnFunc(ctx, publish)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*paho.PublishResponse)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, *paho.Publish) error); ok {
		r1 = returnFunc(ctx, publish)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Publish is a helper method to define mock.On call
//   - ctx context.Context
//   - publish *paho.Publish
func (_e *MockConnectionManager_Expecter) Publish(ctx interface{}, publish interface{}) *MockConnectionManager_Publish_Call {
	return &MockConnectionManager_Publish_Call{Call: _e.mock.On("Publish", ctx, publish)}
}

func (_c *MockConnectionManager_Publish_Call) Run(run func(ctx context.Context, publish *paho.Publish)) *MockConnectionManager_Publish_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *paho.Publish
		if args[1] != nil {
			arg1 = args[1].(*paho.Publish)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *MockConnectionManager_Publish_Call) Return(publishResponse *paho.PublishResponse, err error) *MockConnectionManager_Publish_Call {
	_c.Call.Return(publishResponse, err)
	return _c
}

func (_c *MockConnectionManager_Publish_Call) RunAndReturn(run func(ctx context.Context, publish *paho.Publish) (*paho.PublishResponse, error)) *MockConnectionManager_Publish_Call {
	_c.Call.Return(run)
	return _c
}
