github.com/anjalikarhana/fabric@v2.1.1+incompatible/orderer/common/server/mocks/factory.go (about)

     1  // Code generated by mockery v1.0.0. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import (
     6  	blockledger "github.com/hyperledger/fabric/common/ledger/blockledger"
     7  	mock "github.com/stretchr/testify/mock"
     8  )
     9  
    10  // Factory is an autogenerated mock type for the Factory type
    11  type Factory struct {
    12  	mock.Mock
    13  }
    14  
    15  // ChannelIDs provides a mock function with given fields:
    16  func (_m *Factory) ChannelIDs() []string {
    17  	ret := _m.Called()
    18  
    19  	var r0 []string
    20  	if rf, ok := ret.Get(0).(func() []string); ok {
    21  		r0 = rf()
    22  	} else {
    23  		if ret.Get(0) != nil {
    24  			r0 = ret.Get(0).([]string)
    25  		}
    26  	}
    27  
    28  	return r0
    29  }
    30  
    31  // Close provides a mock function with given fields:
    32  func (_m *Factory) Close() {
    33  	_m.Called()
    34  }
    35  
    36  // GetOrCreate provides a mock function with given fields: chainID
    37  func (_m *Factory) GetOrCreate(chainID string) (blockledger.ReadWriter, error) {
    38  	ret := _m.Called(chainID)
    39  
    40  	var r0 blockledger.ReadWriter
    41  	if rf, ok := ret.Get(0).(func(string) blockledger.ReadWriter); ok {
    42  		r0 = rf(chainID)
    43  	} else {
    44  		if ret.Get(0) != nil {
    45  			r0 = ret.Get(0).(blockledger.ReadWriter)
    46  		}
    47  	}
    48  
    49  	var r1 error
    50  	if rf, ok := ret.Get(1).(func(string) error); ok {
    51  		r1 = rf(chainID)
    52  	} else {
    53  		r1 = ret.Error(1)
    54  	}
    55  
    56  	return r0, r1
    57  }