62 lines
1.6 KiB
Go
62 lines
1.6 KiB
Go
// Code generated by mockery v2.14.0. DO NOT EDIT.
|
|
|
|
package mocks
|
|
|
|
import (
|
|
cluster "github.com/hyperledger/fabric/orderer/common/cluster"
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// Communicator is an autogenerated mock type for the Communicator type
|
|
type Communicator struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// Configure provides a mock function with given fields: channel, members
|
|
func (_m *Communicator) Configure(channel string, members []cluster.RemoteNode) {
|
|
_m.Called(channel, members)
|
|
}
|
|
|
|
// Remote provides a mock function with given fields: channel, id
|
|
func (_m *Communicator) Remote(channel string, id uint64) (*cluster.RemoteContext, error) {
|
|
ret := _m.Called(channel, id)
|
|
|
|
var r0 *cluster.RemoteContext
|
|
if rf, ok := ret.Get(0).(func(string, uint64) *cluster.RemoteContext); ok {
|
|
r0 = rf(channel, id)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*cluster.RemoteContext)
|
|
}
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(string, uint64) error); ok {
|
|
r1 = rf(channel, id)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Shutdown provides a mock function with given fields:
|
|
func (_m *Communicator) Shutdown() {
|
|
_m.Called()
|
|
}
|
|
|
|
type mockConstructorTestingTNewCommunicator interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}
|
|
|
|
// NewCommunicator creates a new instance of Communicator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
|
func NewCommunicator(t mockConstructorTestingTNewCommunicator) *Communicator {
|
|
mock := &Communicator{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|