github.com/mook-as/cf-cli@v7.0.0-beta.28.0.20200120190804-b91c115fae48+incompatible/cf/appfiles/appfilesfakes/fake_cf_ignore.go (about)

     1  // Code generated by counterfeiter. DO NOT EDIT.
     2  package appfilesfakes
     3  
     4  import (
     5  	"sync"
     6  
     7  	"code.cloudfoundry.org/cli/cf/appfiles"
     8  )
     9  
    10  type FakeCfIgnore struct {
    11  	FileShouldBeIgnoredStub        func(string) bool
    12  	fileShouldBeIgnoredMutex       sync.RWMutex
    13  	fileShouldBeIgnoredArgsForCall []struct {
    14  		arg1 string
    15  	}
    16  	fileShouldBeIgnoredReturns struct {
    17  		result1 bool
    18  	}
    19  	fileShouldBeIgnoredReturnsOnCall map[int]struct {
    20  		result1 bool
    21  	}
    22  	invocations      map[string][][]interface{}
    23  	invocationsMutex sync.RWMutex
    24  }
    25  
    26  func (fake *FakeCfIgnore) FileShouldBeIgnored(arg1 string) bool {
    27  	fake.fileShouldBeIgnoredMutex.Lock()
    28  	ret, specificReturn := fake.fileShouldBeIgnoredReturnsOnCall[len(fake.fileShouldBeIgnoredArgsForCall)]
    29  	fake.fileShouldBeIgnoredArgsForCall = append(fake.fileShouldBeIgnoredArgsForCall, struct {
    30  		arg1 string
    31  	}{arg1})
    32  	fake.recordInvocation("FileShouldBeIgnored", []interface{}{arg1})
    33  	fake.fileShouldBeIgnoredMutex.Unlock()
    34  	if fake.FileShouldBeIgnoredStub != nil {
    35  		return fake.FileShouldBeIgnoredStub(arg1)
    36  	}
    37  	if specificReturn {
    38  		return ret.result1
    39  	}
    40  	fakeReturns := fake.fileShouldBeIgnoredReturns
    41  	return fakeReturns.result1
    42  }
    43  
    44  func (fake *FakeCfIgnore) FileShouldBeIgnoredCallCount() int {
    45  	fake.fileShouldBeIgnoredMutex.RLock()
    46  	defer fake.fileShouldBeIgnoredMutex.RUnlock()
    47  	return len(fake.fileShouldBeIgnoredArgsForCall)
    48  }
    49  
    50  func (fake *FakeCfIgnore) FileShouldBeIgnoredCalls(stub func(string) bool) {
    51  	fake.fileShouldBeIgnoredMutex.Lock()
    52  	defer fake.fileShouldBeIgnoredMutex.Unlock()
    53  	fake.FileShouldBeIgnoredStub = stub
    54  }
    55  
    56  func (fake *FakeCfIgnore) FileShouldBeIgnoredArgsForCall(i int) string {
    57  	fake.fileShouldBeIgnoredMutex.RLock()
    58  	defer fake.fileShouldBeIgnoredMutex.RUnlock()
    59  	argsForCall := fake.fileShouldBeIgnoredArgsForCall[i]
    60  	return argsForCall.arg1
    61  }
    62  
    63  func (fake *FakeCfIgnore) FileShouldBeIgnoredReturns(result1 bool) {
    64  	fake.fileShouldBeIgnoredMutex.Lock()
    65  	defer fake.fileShouldBeIgnoredMutex.Unlock()
    66  	fake.FileShouldBeIgnoredStub = nil
    67  	fake.fileShouldBeIgnoredReturns = struct {
    68  		result1 bool
    69  	}{result1}
    70  }
    71  
    72  func (fake *FakeCfIgnore) FileShouldBeIgnoredReturnsOnCall(i int, result1 bool) {
    73  	fake.fileShouldBeIgnoredMutex.Lock()
    74  	defer fake.fileShouldBeIgnoredMutex.Unlock()
    75  	fake.FileShouldBeIgnoredStub = nil
    76  	if fake.fileShouldBeIgnoredReturnsOnCall == nil {
    77  		fake.fileShouldBeIgnoredReturnsOnCall = make(map[int]struct {
    78  			result1 bool
    79  		})
    80  	}
    81  	fake.fileShouldBeIgnoredReturnsOnCall[i] = struct {
    82  		result1 bool
    83  	}{result1}
    84  }
    85  
    86  func (fake *FakeCfIgnore) Invocations() map[string][][]interface{} {
    87  	fake.invocationsMutex.RLock()
    88  	defer fake.invocationsMutex.RUnlock()
    89  	fake.fileShouldBeIgnoredMutex.RLock()
    90  	defer fake.fileShouldBeIgnoredMutex.RUnlock()
    91  	copiedInvocations := map[string][][]interface{}{}
    92  	for key, value := range fake.invocations {
    93  		copiedInvocations[key] = value
    94  	}
    95  	return copiedInvocations
    96  }
    97  
    98  func (fake *FakeCfIgnore) recordInvocation(key string, args []interface{}) {
    99  	fake.invocationsMutex.Lock()
   100  	defer fake.invocationsMutex.Unlock()
   101  	if fake.invocations == nil {
   102  		fake.invocations = map[string][][]interface{}{}
   103  	}
   104  	if fake.invocations[key] == nil {
   105  		fake.invocations[key] = [][]interface{}{}
   106  	}
   107  	fake.invocations[key] = append(fake.invocations[key], args)
   108  }
   109  
   110  var _ appfiles.CfIgnore = new(FakeCfIgnore)