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

package mocks

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

	smartbftprotos "github.com/hyperledger-labs/SmartBFT/smartbftprotos"
)

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

type EgressComm_Expecter struct {
	mock *mock.Mock
}

func (_m *EgressComm) EXPECT() *EgressComm_Expecter {
	return &EgressComm_Expecter{mock: &_m.Mock}
}

// Nodes provides a mock function with given fields:
func (_m *EgressComm) Nodes() []uint64 {
	ret := _m.Called()

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

	var r0 []uint64
	if rf, ok := ret.Get(0).(func() []uint64); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]uint64)
		}
	}

	return r0
}

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

// Nodes is a helper method to define mock.On call
func (_e *EgressComm_Expecter) Nodes() *EgressComm_Nodes_Call {
	return &EgressComm_Nodes_Call{Call: _e.mock.On("Nodes")}
}

func (_c *EgressComm_Nodes_Call) Run(run func()) *EgressComm_Nodes_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *EgressComm_Nodes_Call) Return(_a0 []uint64) *EgressComm_Nodes_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *EgressComm_Nodes_Call) RunAndReturn(run func() []uint64) *EgressComm_Nodes_Call {
	_c.Call.Return(run)
	return _c
}

// SendConsensus provides a mock function with given fields: targetID, m
func (_m *EgressComm) SendConsensus(targetID uint64, m *smartbftprotos.Message) {
	_m.Called(targetID, m)
}

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

// SendConsensus is a helper method to define mock.On call
//   - targetID uint64
//   - m *smartbftprotos.Message
func (_e *EgressComm_Expecter) SendConsensus(targetID interface{}, m interface{}) *EgressComm_SendConsensus_Call {
	return &EgressComm_SendConsensus_Call{Call: _e.mock.On("SendConsensus", targetID, m)}
}

func (_c *EgressComm_SendConsensus_Call) Run(run func(targetID uint64, m *smartbftprotos.Message)) *EgressComm_SendConsensus_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(uint64), args[1].(*smartbftprotos.Message))
	})
	return _c
}

func (_c *EgressComm_SendConsensus_Call) Return() *EgressComm_SendConsensus_Call {
	_c.Call.Return()
	return _c
}

func (_c *EgressComm_SendConsensus_Call) RunAndReturn(run func(uint64, *smartbftprotos.Message)) *EgressComm_SendConsensus_Call {
	_c.Call.Return(run)
	return _c
}

// SendTransaction provides a mock function with given fields: targetID, request
func (_m *EgressComm) SendTransaction(targetID uint64, request []byte) {
	_m.Called(targetID, request)
}

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

// SendTransaction is a helper method to define mock.On call
//   - targetID uint64
//   - request []byte
func (_e *EgressComm_Expecter) SendTransaction(targetID interface{}, request interface{}) *EgressComm_SendTransaction_Call {
	return &EgressComm_SendTransaction_Call{Call: _e.mock.On("SendTransaction", targetID, request)}
}

func (_c *EgressComm_SendTransaction_Call) Run(run func(targetID uint64, request []byte)) *EgressComm_SendTransaction_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(uint64), args[1].([]byte))
	})
	return _c
}

func (_c *EgressComm_SendTransaction_Call) Return() *EgressComm_SendTransaction_Call {
	_c.Call.Return()
	return _c
}

func (_c *EgressComm_SendTransaction_Call) RunAndReturn(run func(uint64, []byte)) *EgressComm_SendTransaction_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
