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

     1  // Code generated by counterfeiter. DO NOT EDIT.
     2  package mocks
     3  
     4  import (
     5  	"sync"
     6  )
     7  
     8  type OrdererCapabilities struct {
     9  	ConsensusTypeMigrationStub        func() bool
    10  	consensusTypeMigrationMutex       sync.RWMutex
    11  	consensusTypeMigrationArgsForCall []struct {
    12  	}
    13  	consensusTypeMigrationReturns struct {
    14  		result1 bool
    15  	}
    16  	consensusTypeMigrationReturnsOnCall map[int]struct {
    17  		result1 bool
    18  	}
    19  	ExpirationCheckStub        func() bool
    20  	expirationCheckMutex       sync.RWMutex
    21  	expirationCheckArgsForCall []struct {
    22  	}
    23  	expirationCheckReturns struct {
    24  		result1 bool
    25  	}
    26  	expirationCheckReturnsOnCall map[int]struct {
    27  		result1 bool
    28  	}
    29  	PredictableChannelTemplateStub        func() bool
    30  	predictableChannelTemplateMutex       sync.RWMutex
    31  	predictableChannelTemplateArgsForCall []struct {
    32  	}
    33  	predictableChannelTemplateReturns struct {
    34  		result1 bool
    35  	}
    36  	predictableChannelTemplateReturnsOnCall map[int]struct {
    37  		result1 bool
    38  	}
    39  	ResubmissionStub        func() bool
    40  	resubmissionMutex       sync.RWMutex
    41  	resubmissionArgsForCall []struct {
    42  	}
    43  	resubmissionReturns struct {
    44  		result1 bool
    45  	}
    46  	resubmissionReturnsOnCall map[int]struct {
    47  		result1 bool
    48  	}
    49  	SupportedStub        func() error
    50  	supportedMutex       sync.RWMutex
    51  	supportedArgsForCall []struct {
    52  	}
    53  	supportedReturns struct {
    54  		result1 error
    55  	}
    56  	supportedReturnsOnCall map[int]struct {
    57  		result1 error
    58  	}
    59  	UseChannelCreationPolicyAsAdminsStub        func() bool
    60  	useChannelCreationPolicyAsAdminsMutex       sync.RWMutex
    61  	useChannelCreationPolicyAsAdminsArgsForCall []struct {
    62  	}
    63  	useChannelCreationPolicyAsAdminsReturns struct {
    64  		result1 bool
    65  	}
    66  	useChannelCreationPolicyAsAdminsReturnsOnCall map[int]struct {
    67  		result1 bool
    68  	}
    69  	invocations      map[string][][]interface{}
    70  	invocationsMutex sync.RWMutex
    71  }
    72  
    73  func (fake *OrdererCapabilities) ConsensusTypeMigration() bool {
    74  	fake.consensusTypeMigrationMutex.Lock()
    75  	ret, specificReturn := fake.consensusTypeMigrationReturnsOnCall[len(fake.consensusTypeMigrationArgsForCall)]
    76  	fake.consensusTypeMigrationArgsForCall = append(fake.consensusTypeMigrationArgsForCall, struct {
    77  	}{})
    78  	fake.recordInvocation("ConsensusTypeMigration", []interface{}{})
    79  	fake.consensusTypeMigrationMutex.Unlock()
    80  	if fake.ConsensusTypeMigrationStub != nil {
    81  		return fake.ConsensusTypeMigrationStub()
    82  	}
    83  	if specificReturn {
    84  		return ret.result1
    85  	}
    86  	fakeReturns := fake.consensusTypeMigrationReturns
    87  	return fakeReturns.result1
    88  }
    89  
    90  func (fake *OrdererCapabilities) ConsensusTypeMigrationCallCount() int {
    91  	fake.consensusTypeMigrationMutex.RLock()
    92  	defer fake.consensusTypeMigrationMutex.RUnlock()
    93  	return len(fake.consensusTypeMigrationArgsForCall)
    94  }
    95  
    96  func (fake *OrdererCapabilities) ConsensusTypeMigrationCalls(stub func() bool) {
    97  	fake.consensusTypeMigrationMutex.Lock()
    98  	defer fake.consensusTypeMigrationMutex.Unlock()
    99  	fake.ConsensusTypeMigrationStub = stub
   100  }
   101  
   102  func (fake *OrdererCapabilities) ConsensusTypeMigrationReturns(result1 bool) {
   103  	fake.consensusTypeMigrationMutex.Lock()
   104  	defer fake.consensusTypeMigrationMutex.Unlock()
   105  	fake.ConsensusTypeMigrationStub = nil
   106  	fake.consensusTypeMigrationReturns = struct {
   107  		result1 bool
   108  	}{result1}
   109  }
   110  
   111  func (fake *OrdererCapabilities) ConsensusTypeMigrationReturnsOnCall(i int, result1 bool) {
   112  	fake.consensusTypeMigrationMutex.Lock()
   113  	defer fake.consensusTypeMigrationMutex.Unlock()
   114  	fake.ConsensusTypeMigrationStub = nil
   115  	if fake.consensusTypeMigrationReturnsOnCall == nil {
   116  		fake.consensusTypeMigrationReturnsOnCall = make(map[int]struct {
   117  			result1 bool
   118  		})
   119  	}
   120  	fake.consensusTypeMigrationReturnsOnCall[i] = struct {
   121  		result1 bool
   122  	}{result1}
   123  }
   124  
   125  func (fake *OrdererCapabilities) ExpirationCheck() bool {
   126  	fake.expirationCheckMutex.Lock()
   127  	ret, specificReturn := fake.expirationCheckReturnsOnCall[len(fake.expirationCheckArgsForCall)]
   128  	fake.expirationCheckArgsForCall = append(fake.expirationCheckArgsForCall, struct {
   129  	}{})
   130  	fake.recordInvocation("ExpirationCheck", []interface{}{})
   131  	fake.expirationCheckMutex.Unlock()
   132  	if fake.ExpirationCheckStub != nil {
   133  		return fake.ExpirationCheckStub()
   134  	}
   135  	if specificReturn {
   136  		return ret.result1
   137  	}
   138  	fakeReturns := fake.expirationCheckReturns
   139  	return fakeReturns.result1
   140  }
   141  
   142  func (fake *OrdererCapabilities) ExpirationCheckCallCount() int {
   143  	fake.expirationCheckMutex.RLock()
   144  	defer fake.expirationCheckMutex.RUnlock()
   145  	return len(fake.expirationCheckArgsForCall)
   146  }
   147  
   148  func (fake *OrdererCapabilities) ExpirationCheckCalls(stub func() bool) {
   149  	fake.expirationCheckMutex.Lock()
   150  	defer fake.expirationCheckMutex.Unlock()
   151  	fake.ExpirationCheckStub = stub
   152  }
   153  
   154  func (fake *OrdererCapabilities) ExpirationCheckReturns(result1 bool) {
   155  	fake.expirationCheckMutex.Lock()
   156  	defer fake.expirationCheckMutex.Unlock()
   157  	fake.ExpirationCheckStub = nil
   158  	fake.expirationCheckReturns = struct {
   159  		result1 bool
   160  	}{result1}
   161  }
   162  
   163  func (fake *OrdererCapabilities) ExpirationCheckReturnsOnCall(i int, result1 bool) {
   164  	fake.expirationCheckMutex.Lock()
   165  	defer fake.expirationCheckMutex.Unlock()
   166  	fake.ExpirationCheckStub = nil
   167  	if fake.expirationCheckReturnsOnCall == nil {
   168  		fake.expirationCheckReturnsOnCall = make(map[int]struct {
   169  			result1 bool
   170  		})
   171  	}
   172  	fake.expirationCheckReturnsOnCall[i] = struct {
   173  		result1 bool
   174  	}{result1}
   175  }
   176  
   177  func (fake *OrdererCapabilities) PredictableChannelTemplate() bool {
   178  	fake.predictableChannelTemplateMutex.Lock()
   179  	ret, specificReturn := fake.predictableChannelTemplateReturnsOnCall[len(fake.predictableChannelTemplateArgsForCall)]
   180  	fake.predictableChannelTemplateArgsForCall = append(fake.predictableChannelTemplateArgsForCall, struct {
   181  	}{})
   182  	fake.recordInvocation("PredictableChannelTemplate", []interface{}{})
   183  	fake.predictableChannelTemplateMutex.Unlock()
   184  	if fake.PredictableChannelTemplateStub != nil {
   185  		return fake.PredictableChannelTemplateStub()
   186  	}
   187  	if specificReturn {
   188  		return ret.result1
   189  	}
   190  	fakeReturns := fake.predictableChannelTemplateReturns
   191  	return fakeReturns.result1
   192  }
   193  
   194  func (fake *OrdererCapabilities) PredictableChannelTemplateCallCount() int {
   195  	fake.predictableChannelTemplateMutex.RLock()
   196  	defer fake.predictableChannelTemplateMutex.RUnlock()
   197  	return len(fake.predictableChannelTemplateArgsForCall)
   198  }
   199  
   200  func (fake *OrdererCapabilities) PredictableChannelTemplateCalls(stub func() bool) {
   201  	fake.predictableChannelTemplateMutex.Lock()
   202  	defer fake.predictableChannelTemplateMutex.Unlock()
   203  	fake.PredictableChannelTemplateStub = stub
   204  }
   205  
   206  func (fake *OrdererCapabilities) PredictableChannelTemplateReturns(result1 bool) {
   207  	fake.predictableChannelTemplateMutex.Lock()
   208  	defer fake.predictableChannelTemplateMutex.Unlock()
   209  	fake.PredictableChannelTemplateStub = nil
   210  	fake.predictableChannelTemplateReturns = struct {
   211  		result1 bool
   212  	}{result1}
   213  }
   214  
   215  func (fake *OrdererCapabilities) PredictableChannelTemplateReturnsOnCall(i int, result1 bool) {
   216  	fake.predictableChannelTemplateMutex.Lock()
   217  	defer fake.predictableChannelTemplateMutex.Unlock()
   218  	fake.PredictableChannelTemplateStub = nil
   219  	if fake.predictableChannelTemplateReturnsOnCall == nil {
   220  		fake.predictableChannelTemplateReturnsOnCall = make(map[int]struct {
   221  			result1 bool
   222  		})
   223  	}
   224  	fake.predictableChannelTemplateReturnsOnCall[i] = struct {
   225  		result1 bool
   226  	}{result1}
   227  }
   228  
   229  func (fake *OrdererCapabilities) Resubmission() bool {
   230  	fake.resubmissionMutex.Lock()
   231  	ret, specificReturn := fake.resubmissionReturnsOnCall[len(fake.resubmissionArgsForCall)]
   232  	fake.resubmissionArgsForCall = append(fake.resubmissionArgsForCall, struct {
   233  	}{})
   234  	fake.recordInvocation("Resubmission", []interface{}{})
   235  	fake.resubmissionMutex.Unlock()
   236  	if fake.ResubmissionStub != nil {
   237  		return fake.ResubmissionStub()
   238  	}
   239  	if specificReturn {
   240  		return ret.result1
   241  	}
   242  	fakeReturns := fake.resubmissionReturns
   243  	return fakeReturns.result1
   244  }
   245  
   246  func (fake *OrdererCapabilities) ResubmissionCallCount() int {
   247  	fake.resubmissionMutex.RLock()
   248  	defer fake.resubmissionMutex.RUnlock()
   249  	return len(fake.resubmissionArgsForCall)
   250  }
   251  
   252  func (fake *OrdererCapabilities) ResubmissionCalls(stub func() bool) {
   253  	fake.resubmissionMutex.Lock()
   254  	defer fake.resubmissionMutex.Unlock()
   255  	fake.ResubmissionStub = stub
   256  }
   257  
   258  func (fake *OrdererCapabilities) ResubmissionReturns(result1 bool) {
   259  	fake.resubmissionMutex.Lock()
   260  	defer fake.resubmissionMutex.Unlock()
   261  	fake.ResubmissionStub = nil
   262  	fake.resubmissionReturns = struct {
   263  		result1 bool
   264  	}{result1}
   265  }
   266  
   267  func (fake *OrdererCapabilities) ResubmissionReturnsOnCall(i int, result1 bool) {
   268  	fake.resubmissionMutex.Lock()
   269  	defer fake.resubmissionMutex.Unlock()
   270  	fake.ResubmissionStub = nil
   271  	if fake.resubmissionReturnsOnCall == nil {
   272  		fake.resubmissionReturnsOnCall = make(map[int]struct {
   273  			result1 bool
   274  		})
   275  	}
   276  	fake.resubmissionReturnsOnCall[i] = struct {
   277  		result1 bool
   278  	}{result1}
   279  }
   280  
   281  func (fake *OrdererCapabilities) Supported() error {
   282  	fake.supportedMutex.Lock()
   283  	ret, specificReturn := fake.supportedReturnsOnCall[len(fake.supportedArgsForCall)]
   284  	fake.supportedArgsForCall = append(fake.supportedArgsForCall, struct {
   285  	}{})
   286  	fake.recordInvocation("Supported", []interface{}{})
   287  	fake.supportedMutex.Unlock()
   288  	if fake.SupportedStub != nil {
   289  		return fake.SupportedStub()
   290  	}
   291  	if specificReturn {
   292  		return ret.result1
   293  	}
   294  	fakeReturns := fake.supportedReturns
   295  	return fakeReturns.result1
   296  }
   297  
   298  func (fake *OrdererCapabilities) SupportedCallCount() int {
   299  	fake.supportedMutex.RLock()
   300  	defer fake.supportedMutex.RUnlock()
   301  	return len(fake.supportedArgsForCall)
   302  }
   303  
   304  func (fake *OrdererCapabilities) SupportedCalls(stub func() error) {
   305  	fake.supportedMutex.Lock()
   306  	defer fake.supportedMutex.Unlock()
   307  	fake.SupportedStub = stub
   308  }
   309  
   310  func (fake *OrdererCapabilities) SupportedReturns(result1 error) {
   311  	fake.supportedMutex.Lock()
   312  	defer fake.supportedMutex.Unlock()
   313  	fake.SupportedStub = nil
   314  	fake.supportedReturns = struct {
   315  		result1 error
   316  	}{result1}
   317  }
   318  
   319  func (fake *OrdererCapabilities) SupportedReturnsOnCall(i int, result1 error) {
   320  	fake.supportedMutex.Lock()
   321  	defer fake.supportedMutex.Unlock()
   322  	fake.SupportedStub = nil
   323  	if fake.supportedReturnsOnCall == nil {
   324  		fake.supportedReturnsOnCall = make(map[int]struct {
   325  			result1 error
   326  		})
   327  	}
   328  	fake.supportedReturnsOnCall[i] = struct {
   329  		result1 error
   330  	}{result1}
   331  }
   332  
   333  func (fake *OrdererCapabilities) UseChannelCreationPolicyAsAdmins() bool {
   334  	fake.useChannelCreationPolicyAsAdminsMutex.Lock()
   335  	ret, specificReturn := fake.useChannelCreationPolicyAsAdminsReturnsOnCall[len(fake.useChannelCreationPolicyAsAdminsArgsForCall)]
   336  	fake.useChannelCreationPolicyAsAdminsArgsForCall = append(fake.useChannelCreationPolicyAsAdminsArgsForCall, struct {
   337  	}{})
   338  	fake.recordInvocation("UseChannelCreationPolicyAsAdmins", []interface{}{})
   339  	fake.useChannelCreationPolicyAsAdminsMutex.Unlock()
   340  	if fake.UseChannelCreationPolicyAsAdminsStub != nil {
   341  		return fake.UseChannelCreationPolicyAsAdminsStub()
   342  	}
   343  	if specificReturn {
   344  		return ret.result1
   345  	}
   346  	fakeReturns := fake.useChannelCreationPolicyAsAdminsReturns
   347  	return fakeReturns.result1
   348  }
   349  
   350  func (fake *OrdererCapabilities) UseChannelCreationPolicyAsAdminsCallCount() int {
   351  	fake.useChannelCreationPolicyAsAdminsMutex.RLock()
   352  	defer fake.useChannelCreationPolicyAsAdminsMutex.RUnlock()
   353  	return len(fake.useChannelCreationPolicyAsAdminsArgsForCall)
   354  }
   355  
   356  func (fake *OrdererCapabilities) UseChannelCreationPolicyAsAdminsCalls(stub func() bool) {
   357  	fake.useChannelCreationPolicyAsAdminsMutex.Lock()
   358  	defer fake.useChannelCreationPolicyAsAdminsMutex.Unlock()
   359  	fake.UseChannelCreationPolicyAsAdminsStub = stub
   360  }
   361  
   362  func (fake *OrdererCapabilities) UseChannelCreationPolicyAsAdminsReturns(result1 bool) {
   363  	fake.useChannelCreationPolicyAsAdminsMutex.Lock()
   364  	defer fake.useChannelCreationPolicyAsAdminsMutex.Unlock()
   365  	fake.UseChannelCreationPolicyAsAdminsStub = nil
   366  	fake.useChannelCreationPolicyAsAdminsReturns = struct {
   367  		result1 bool
   368  	}{result1}
   369  }
   370  
   371  func (fake *OrdererCapabilities) UseChannelCreationPolicyAsAdminsReturnsOnCall(i int, result1 bool) {
   372  	fake.useChannelCreationPolicyAsAdminsMutex.Lock()
   373  	defer fake.useChannelCreationPolicyAsAdminsMutex.Unlock()
   374  	fake.UseChannelCreationPolicyAsAdminsStub = nil
   375  	if fake.useChannelCreationPolicyAsAdminsReturnsOnCall == nil {
   376  		fake.useChannelCreationPolicyAsAdminsReturnsOnCall = make(map[int]struct {
   377  			result1 bool
   378  		})
   379  	}
   380  	fake.useChannelCreationPolicyAsAdminsReturnsOnCall[i] = struct {
   381  		result1 bool
   382  	}{result1}
   383  }
   384  
   385  func (fake *OrdererCapabilities) Invocations() map[string][][]interface{} {
   386  	fake.invocationsMutex.RLock()
   387  	defer fake.invocationsMutex.RUnlock()
   388  	fake.consensusTypeMigrationMutex.RLock()
   389  	defer fake.consensusTypeMigrationMutex.RUnlock()
   390  	fake.expirationCheckMutex.RLock()
   391  	defer fake.expirationCheckMutex.RUnlock()
   392  	fake.predictableChannelTemplateMutex.RLock()
   393  	defer fake.predictableChannelTemplateMutex.RUnlock()
   394  	fake.resubmissionMutex.RLock()
   395  	defer fake.resubmissionMutex.RUnlock()
   396  	fake.supportedMutex.RLock()
   397  	defer fake.supportedMutex.RUnlock()
   398  	fake.useChannelCreationPolicyAsAdminsMutex.RLock()
   399  	defer fake.useChannelCreationPolicyAsAdminsMutex.RUnlock()
   400  	copiedInvocations := map[string][][]interface{}{}
   401  	for key, value := range fake.invocations {
   402  		copiedInvocations[key] = value
   403  	}
   404  	return copiedInvocations
   405  }
   406  
   407  func (fake *OrdererCapabilities) recordInvocation(key string, args []interface{}) {
   408  	fake.invocationsMutex.Lock()
   409  	defer fake.invocationsMutex.Unlock()
   410  	if fake.invocations == nil {
   411  		fake.invocations = map[string][][]interface{}{}
   412  	}
   413  	if fake.invocations[key] == nil {
   414  		fake.invocations[key] = [][]interface{}{}
   415  	}
   416  	fake.invocations[key] = append(fake.invocations[key], args)
   417  }