github.com/IBM-Blockchain/fabric-operator@v1.0.4/pkg/offering/common/reconcilechecks/images/mocks/update.go (about)

     1  // Code generated by counterfeiter. DO NOT EDIT.
     2  package mocks
     3  
     4  import (
     5  	"sync"
     6  
     7  	"github.com/IBM-Blockchain/fabric-operator/pkg/offering/common/reconcilechecks/images"
     8  )
     9  
    10  type Update struct {
    11  	FabricVersionUpdatedStub        func() bool
    12  	fabricVersionUpdatedMutex       sync.RWMutex
    13  	fabricVersionUpdatedArgsForCall []struct {
    14  	}
    15  	fabricVersionUpdatedReturns struct {
    16  		result1 bool
    17  	}
    18  	fabricVersionUpdatedReturnsOnCall map[int]struct {
    19  		result1 bool
    20  	}
    21  	ImagesUpdatedStub        func() bool
    22  	imagesUpdatedMutex       sync.RWMutex
    23  	imagesUpdatedArgsForCall []struct {
    24  	}
    25  	imagesUpdatedReturns struct {
    26  		result1 bool
    27  	}
    28  	imagesUpdatedReturnsOnCall map[int]struct {
    29  		result1 bool
    30  	}
    31  	invocations      map[string][][]interface{}
    32  	invocationsMutex sync.RWMutex
    33  }
    34  
    35  func (fake *Update) FabricVersionUpdated() bool {
    36  	fake.fabricVersionUpdatedMutex.Lock()
    37  	ret, specificReturn := fake.fabricVersionUpdatedReturnsOnCall[len(fake.fabricVersionUpdatedArgsForCall)]
    38  	fake.fabricVersionUpdatedArgsForCall = append(fake.fabricVersionUpdatedArgsForCall, struct {
    39  	}{})
    40  	stub := fake.FabricVersionUpdatedStub
    41  	fakeReturns := fake.fabricVersionUpdatedReturns
    42  	fake.recordInvocation("FabricVersionUpdated", []interface{}{})
    43  	fake.fabricVersionUpdatedMutex.Unlock()
    44  	if stub != nil {
    45  		return stub()
    46  	}
    47  	if specificReturn {
    48  		return ret.result1
    49  	}
    50  	return fakeReturns.result1
    51  }
    52  
    53  func (fake *Update) FabricVersionUpdatedCallCount() int {
    54  	fake.fabricVersionUpdatedMutex.RLock()
    55  	defer fake.fabricVersionUpdatedMutex.RUnlock()
    56  	return len(fake.fabricVersionUpdatedArgsForCall)
    57  }
    58  
    59  func (fake *Update) FabricVersionUpdatedCalls(stub func() bool) {
    60  	fake.fabricVersionUpdatedMutex.Lock()
    61  	defer fake.fabricVersionUpdatedMutex.Unlock()
    62  	fake.FabricVersionUpdatedStub = stub
    63  }
    64  
    65  func (fake *Update) FabricVersionUpdatedReturns(result1 bool) {
    66  	fake.fabricVersionUpdatedMutex.Lock()
    67  	defer fake.fabricVersionUpdatedMutex.Unlock()
    68  	fake.FabricVersionUpdatedStub = nil
    69  	fake.fabricVersionUpdatedReturns = struct {
    70  		result1 bool
    71  	}{result1}
    72  }
    73  
    74  func (fake *Update) FabricVersionUpdatedReturnsOnCall(i int, result1 bool) {
    75  	fake.fabricVersionUpdatedMutex.Lock()
    76  	defer fake.fabricVersionUpdatedMutex.Unlock()
    77  	fake.FabricVersionUpdatedStub = nil
    78  	if fake.fabricVersionUpdatedReturnsOnCall == nil {
    79  		fake.fabricVersionUpdatedReturnsOnCall = make(map[int]struct {
    80  			result1 bool
    81  		})
    82  	}
    83  	fake.fabricVersionUpdatedReturnsOnCall[i] = struct {
    84  		result1 bool
    85  	}{result1}
    86  }
    87  
    88  func (fake *Update) ImagesUpdated() bool {
    89  	fake.imagesUpdatedMutex.Lock()
    90  	ret, specificReturn := fake.imagesUpdatedReturnsOnCall[len(fake.imagesUpdatedArgsForCall)]
    91  	fake.imagesUpdatedArgsForCall = append(fake.imagesUpdatedArgsForCall, struct {
    92  	}{})
    93  	stub := fake.ImagesUpdatedStub
    94  	fakeReturns := fake.imagesUpdatedReturns
    95  	fake.recordInvocation("ImagesUpdated", []interface{}{})
    96  	fake.imagesUpdatedMutex.Unlock()
    97  	if stub != nil {
    98  		return stub()
    99  	}
   100  	if specificReturn {
   101  		return ret.result1
   102  	}
   103  	return fakeReturns.result1
   104  }
   105  
   106  func (fake *Update) ImagesUpdatedCallCount() int {
   107  	fake.imagesUpdatedMutex.RLock()
   108  	defer fake.imagesUpdatedMutex.RUnlock()
   109  	return len(fake.imagesUpdatedArgsForCall)
   110  }
   111  
   112  func (fake *Update) ImagesUpdatedCalls(stub func() bool) {
   113  	fake.imagesUpdatedMutex.Lock()
   114  	defer fake.imagesUpdatedMutex.Unlock()
   115  	fake.ImagesUpdatedStub = stub
   116  }
   117  
   118  func (fake *Update) ImagesUpdatedReturns(result1 bool) {
   119  	fake.imagesUpdatedMutex.Lock()
   120  	defer fake.imagesUpdatedMutex.Unlock()
   121  	fake.ImagesUpdatedStub = nil
   122  	fake.imagesUpdatedReturns = struct {
   123  		result1 bool
   124  	}{result1}
   125  }
   126  
   127  func (fake *Update) ImagesUpdatedReturnsOnCall(i int, result1 bool) {
   128  	fake.imagesUpdatedMutex.Lock()
   129  	defer fake.imagesUpdatedMutex.Unlock()
   130  	fake.ImagesUpdatedStub = nil
   131  	if fake.imagesUpdatedReturnsOnCall == nil {
   132  		fake.imagesUpdatedReturnsOnCall = make(map[int]struct {
   133  			result1 bool
   134  		})
   135  	}
   136  	fake.imagesUpdatedReturnsOnCall[i] = struct {
   137  		result1 bool
   138  	}{result1}
   139  }
   140  
   141  func (fake *Update) Invocations() map[string][][]interface{} {
   142  	fake.invocationsMutex.RLock()
   143  	defer fake.invocationsMutex.RUnlock()
   144  	fake.fabricVersionUpdatedMutex.RLock()
   145  	defer fake.fabricVersionUpdatedMutex.RUnlock()
   146  	fake.imagesUpdatedMutex.RLock()
   147  	defer fake.imagesUpdatedMutex.RUnlock()
   148  	copiedInvocations := map[string][][]interface{}{}
   149  	for key, value := range fake.invocations {
   150  		copiedInvocations[key] = value
   151  	}
   152  	return copiedInvocations
   153  }
   154  
   155  func (fake *Update) recordInvocation(key string, args []interface{}) {
   156  	fake.invocationsMutex.Lock()
   157  	defer fake.invocationsMutex.Unlock()
   158  	if fake.invocations == nil {
   159  		fake.invocations = map[string][][]interface{}{}
   160  	}
   161  	if fake.invocations[key] == nil {
   162  		fake.invocations[key] = [][]interface{}{}
   163  	}
   164  	fake.invocations[key] = append(fake.invocations[key], args)
   165  }
   166  
   167  var _ images.Update = new(Update)