github.com/koko1123/flow-go-1@v0.29.6/engine/access/rpc/backend/mock/connection_factory.go (about)

     1  // Code generated by mockery v2.13.1. DO NOT EDIT.
     2  
     3  package mock
     4  
     5  import (
     6  	access "github.com/onflow/flow/protobuf/go/flow/access"
     7  
     8  	execution "github.com/onflow/flow/protobuf/go/flow/execution"
     9  
    10  	io "io"
    11  
    12  	mock "github.com/stretchr/testify/mock"
    13  )
    14  
    15  // ConnectionFactory is an autogenerated mock type for the ConnectionFactory type
    16  type ConnectionFactory struct {
    17  	mock.Mock
    18  }
    19  
    20  // GetAccessAPIClient provides a mock function with given fields: address
    21  func (_m *ConnectionFactory) GetAccessAPIClient(address string) (access.AccessAPIClient, io.Closer, error) {
    22  	ret := _m.Called(address)
    23  
    24  	var r0 access.AccessAPIClient
    25  	if rf, ok := ret.Get(0).(func(string) access.AccessAPIClient); ok {
    26  		r0 = rf(address)
    27  	} else {
    28  		if ret.Get(0) != nil {
    29  			r0 = ret.Get(0).(access.AccessAPIClient)
    30  		}
    31  	}
    32  
    33  	var r1 io.Closer
    34  	if rf, ok := ret.Get(1).(func(string) io.Closer); ok {
    35  		r1 = rf(address)
    36  	} else {
    37  		if ret.Get(1) != nil {
    38  			r1 = ret.Get(1).(io.Closer)
    39  		}
    40  	}
    41  
    42  	var r2 error
    43  	if rf, ok := ret.Get(2).(func(string) error); ok {
    44  		r2 = rf(address)
    45  	} else {
    46  		r2 = ret.Error(2)
    47  	}
    48  
    49  	return r0, r1, r2
    50  }
    51  
    52  // GetExecutionAPIClient provides a mock function with given fields: address
    53  func (_m *ConnectionFactory) GetExecutionAPIClient(address string) (execution.ExecutionAPIClient, io.Closer, error) {
    54  	ret := _m.Called(address)
    55  
    56  	var r0 execution.ExecutionAPIClient
    57  	if rf, ok := ret.Get(0).(func(string) execution.ExecutionAPIClient); ok {
    58  		r0 = rf(address)
    59  	} else {
    60  		if ret.Get(0) != nil {
    61  			r0 = ret.Get(0).(execution.ExecutionAPIClient)
    62  		}
    63  	}
    64  
    65  	var r1 io.Closer
    66  	if rf, ok := ret.Get(1).(func(string) io.Closer); ok {
    67  		r1 = rf(address)
    68  	} else {
    69  		if ret.Get(1) != nil {
    70  			r1 = ret.Get(1).(io.Closer)
    71  		}
    72  	}
    73  
    74  	var r2 error
    75  	if rf, ok := ret.Get(2).(func(string) error); ok {
    76  		r2 = rf(address)
    77  	} else {
    78  		r2 = ret.Error(2)
    79  	}
    80  
    81  	return r0, r1, r2
    82  }
    83  
    84  // InvalidateAccessAPIClient provides a mock function with given fields: address
    85  func (_m *ConnectionFactory) InvalidateAccessAPIClient(address string) {
    86  	_m.Called(address)
    87  }
    88  
    89  // InvalidateExecutionAPIClient provides a mock function with given fields: address
    90  func (_m *ConnectionFactory) InvalidateExecutionAPIClient(address string) {
    91  	_m.Called(address)
    92  }
    93  
    94  type mockConstructorTestingTNewConnectionFactory interface {
    95  	mock.TestingT
    96  	Cleanup(func())
    97  }
    98  
    99  // NewConnectionFactory creates a new instance of ConnectionFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   100  func NewConnectionFactory(t mockConstructorTestingTNewConnectionFactory) *ConnectionFactory {
   101  	mock := &ConnectionFactory{}
   102  	mock.Mock.Test(t)
   103  
   104  	t.Cleanup(func() { mock.AssertExpectations(t) })
   105  
   106  	return mock
   107  }