github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/engine/access/rpc/backend/mock/communicator.go (about)

     1  // Code generated by mockery v2.21.4. DO NOT EDIT.
     2  
     3  package mock
     4  
     5  import (
     6  	flow "github.com/onflow/flow-go/model/flow"
     7  	mock "github.com/stretchr/testify/mock"
     8  )
     9  
    10  // Communicator is an autogenerated mock type for the Communicator type
    11  type Communicator struct {
    12  	mock.Mock
    13  }
    14  
    15  // CallAvailableNode provides a mock function with given fields: nodes, call, shouldTerminateOnError
    16  func (_m *Communicator) CallAvailableNode(nodes flow.GenericIdentityList[flow.IdentitySkeleton], call func(*flow.IdentitySkeleton) error, shouldTerminateOnError func(*flow.IdentitySkeleton, error) bool) error {
    17  	ret := _m.Called(nodes, call, shouldTerminateOnError)
    18  
    19  	var r0 error
    20  	if rf, ok := ret.Get(0).(func(flow.GenericIdentityList[flow.IdentitySkeleton], func(*flow.IdentitySkeleton) error, func(*flow.IdentitySkeleton, error) bool) error); ok {
    21  		r0 = rf(nodes, call, shouldTerminateOnError)
    22  	} else {
    23  		r0 = ret.Error(0)
    24  	}
    25  
    26  	return r0
    27  }
    28  
    29  type mockConstructorTestingTNewCommunicator interface {
    30  	mock.TestingT
    31  	Cleanup(func())
    32  }
    33  
    34  // 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.
    35  func NewCommunicator(t mockConstructorTestingTNewCommunicator) *Communicator {
    36  	mock := &Communicator{}
    37  	mock.Mock.Test(t)
    38  
    39  	t.Cleanup(func() { mock.AssertExpectations(t) })
    40  
    41  	return mock
    42  }