github.com/cloudfoundry-incubator/stembuild@v0.0.0-20211223202937-5b61d62226c6/commandparser/commandparserfakes/fake_construct_cmd_validator.go (about)

     1  // Code generated by counterfeiter. DO NOT EDIT.
     2  package commandparserfakes
     3  
     4  import (
     5  	"sync"
     6  
     7  	"github.com/cloudfoundry-incubator/stembuild/commandparser"
     8  )
     9  
    10  type FakeConstructCmdValidator struct {
    11  	LGPOInDirectoryStub        func() bool
    12  	lGPOInDirectoryMutex       sync.RWMutex
    13  	lGPOInDirectoryArgsForCall []struct {
    14  	}
    15  	lGPOInDirectoryReturns struct {
    16  		result1 bool
    17  	}
    18  	lGPOInDirectoryReturnsOnCall map[int]struct {
    19  		result1 bool
    20  	}
    21  	PopulatedArgsStub        func(...string) bool
    22  	populatedArgsMutex       sync.RWMutex
    23  	populatedArgsArgsForCall []struct {
    24  		arg1 []string
    25  	}
    26  	populatedArgsReturns struct {
    27  		result1 bool
    28  	}
    29  	populatedArgsReturnsOnCall map[int]struct {
    30  		result1 bool
    31  	}
    32  	invocations      map[string][][]interface{}
    33  	invocationsMutex sync.RWMutex
    34  }
    35  
    36  func (fake *FakeConstructCmdValidator) LGPOInDirectory() bool {
    37  	fake.lGPOInDirectoryMutex.Lock()
    38  	ret, specificReturn := fake.lGPOInDirectoryReturnsOnCall[len(fake.lGPOInDirectoryArgsForCall)]
    39  	fake.lGPOInDirectoryArgsForCall = append(fake.lGPOInDirectoryArgsForCall, struct {
    40  	}{})
    41  	fake.recordInvocation("LGPOInDirectory", []interface{}{})
    42  	fake.lGPOInDirectoryMutex.Unlock()
    43  	if fake.LGPOInDirectoryStub != nil {
    44  		return fake.LGPOInDirectoryStub()
    45  	}
    46  	if specificReturn {
    47  		return ret.result1
    48  	}
    49  	fakeReturns := fake.lGPOInDirectoryReturns
    50  	return fakeReturns.result1
    51  }
    52  
    53  func (fake *FakeConstructCmdValidator) LGPOInDirectoryCallCount() int {
    54  	fake.lGPOInDirectoryMutex.RLock()
    55  	defer fake.lGPOInDirectoryMutex.RUnlock()
    56  	return len(fake.lGPOInDirectoryArgsForCall)
    57  }
    58  
    59  func (fake *FakeConstructCmdValidator) LGPOInDirectoryCalls(stub func() bool) {
    60  	fake.lGPOInDirectoryMutex.Lock()
    61  	defer fake.lGPOInDirectoryMutex.Unlock()
    62  	fake.LGPOInDirectoryStub = stub
    63  }
    64  
    65  func (fake *FakeConstructCmdValidator) LGPOInDirectoryReturns(result1 bool) {
    66  	fake.lGPOInDirectoryMutex.Lock()
    67  	defer fake.lGPOInDirectoryMutex.Unlock()
    68  	fake.LGPOInDirectoryStub = nil
    69  	fake.lGPOInDirectoryReturns = struct {
    70  		result1 bool
    71  	}{result1}
    72  }
    73  
    74  func (fake *FakeConstructCmdValidator) LGPOInDirectoryReturnsOnCall(i int, result1 bool) {
    75  	fake.lGPOInDirectoryMutex.Lock()
    76  	defer fake.lGPOInDirectoryMutex.Unlock()
    77  	fake.LGPOInDirectoryStub = nil
    78  	if fake.lGPOInDirectoryReturnsOnCall == nil {
    79  		fake.lGPOInDirectoryReturnsOnCall = make(map[int]struct {
    80  			result1 bool
    81  		})
    82  	}
    83  	fake.lGPOInDirectoryReturnsOnCall[i] = struct {
    84  		result1 bool
    85  	}{result1}
    86  }
    87  
    88  func (fake *FakeConstructCmdValidator) PopulatedArgs(arg1 ...string) bool {
    89  	fake.populatedArgsMutex.Lock()
    90  	ret, specificReturn := fake.populatedArgsReturnsOnCall[len(fake.populatedArgsArgsForCall)]
    91  	fake.populatedArgsArgsForCall = append(fake.populatedArgsArgsForCall, struct {
    92  		arg1 []string
    93  	}{arg1})
    94  	fake.recordInvocation("PopulatedArgs", []interface{}{arg1})
    95  	fake.populatedArgsMutex.Unlock()
    96  	if fake.PopulatedArgsStub != nil {
    97  		return fake.PopulatedArgsStub(arg1...)
    98  	}
    99  	if specificReturn {
   100  		return ret.result1
   101  	}
   102  	fakeReturns := fake.populatedArgsReturns
   103  	return fakeReturns.result1
   104  }
   105  
   106  func (fake *FakeConstructCmdValidator) PopulatedArgsCallCount() int {
   107  	fake.populatedArgsMutex.RLock()
   108  	defer fake.populatedArgsMutex.RUnlock()
   109  	return len(fake.populatedArgsArgsForCall)
   110  }
   111  
   112  func (fake *FakeConstructCmdValidator) PopulatedArgsCalls(stub func(...string) bool) {
   113  	fake.populatedArgsMutex.Lock()
   114  	defer fake.populatedArgsMutex.Unlock()
   115  	fake.PopulatedArgsStub = stub
   116  }
   117  
   118  func (fake *FakeConstructCmdValidator) PopulatedArgsArgsForCall(i int) []string {
   119  	fake.populatedArgsMutex.RLock()
   120  	defer fake.populatedArgsMutex.RUnlock()
   121  	argsForCall := fake.populatedArgsArgsForCall[i]
   122  	return argsForCall.arg1
   123  }
   124  
   125  func (fake *FakeConstructCmdValidator) PopulatedArgsReturns(result1 bool) {
   126  	fake.populatedArgsMutex.Lock()
   127  	defer fake.populatedArgsMutex.Unlock()
   128  	fake.PopulatedArgsStub = nil
   129  	fake.populatedArgsReturns = struct {
   130  		result1 bool
   131  	}{result1}
   132  }
   133  
   134  func (fake *FakeConstructCmdValidator) PopulatedArgsReturnsOnCall(i int, result1 bool) {
   135  	fake.populatedArgsMutex.Lock()
   136  	defer fake.populatedArgsMutex.Unlock()
   137  	fake.PopulatedArgsStub = nil
   138  	if fake.populatedArgsReturnsOnCall == nil {
   139  		fake.populatedArgsReturnsOnCall = make(map[int]struct {
   140  			result1 bool
   141  		})
   142  	}
   143  	fake.populatedArgsReturnsOnCall[i] = struct {
   144  		result1 bool
   145  	}{result1}
   146  }
   147  
   148  func (fake *FakeConstructCmdValidator) Invocations() map[string][][]interface{} {
   149  	fake.invocationsMutex.RLock()
   150  	defer fake.invocationsMutex.RUnlock()
   151  	fake.lGPOInDirectoryMutex.RLock()
   152  	defer fake.lGPOInDirectoryMutex.RUnlock()
   153  	fake.populatedArgsMutex.RLock()
   154  	defer fake.populatedArgsMutex.RUnlock()
   155  	copiedInvocations := map[string][][]interface{}{}
   156  	for key, value := range fake.invocations {
   157  		copiedInvocations[key] = value
   158  	}
   159  	return copiedInvocations
   160  }
   161  
   162  func (fake *FakeConstructCmdValidator) recordInvocation(key string, args []interface{}) {
   163  	fake.invocationsMutex.Lock()
   164  	defer fake.invocationsMutex.Unlock()
   165  	if fake.invocations == nil {
   166  		fake.invocations = map[string][][]interface{}{}
   167  	}
   168  	if fake.invocations[key] == nil {
   169  		fake.invocations[key] = [][]interface{}{}
   170  	}
   171  	fake.invocations[key] = append(fake.invocations[key], args)
   172  }
   173  
   174  var _ commandparser.ConstructCmdValidator = new(FakeConstructCmdValidator)