github.com/loafoe/cli@v7.1.0+incompatible/cf/requirements/requirementsfakes/fake_targeted_org_requirement.go (about)

     1  // Code generated by counterfeiter. DO NOT EDIT.
     2  package requirementsfakes
     3  
     4  import (
     5  	"sync"
     6  
     7  	"code.cloudfoundry.org/cli/cf/models"
     8  	"code.cloudfoundry.org/cli/cf/requirements"
     9  )
    10  
    11  type FakeTargetedOrgRequirement struct {
    12  	ExecuteStub        func() error
    13  	executeMutex       sync.RWMutex
    14  	executeArgsForCall []struct {
    15  	}
    16  	executeReturns struct {
    17  		result1 error
    18  	}
    19  	executeReturnsOnCall map[int]struct {
    20  		result1 error
    21  	}
    22  	GetOrganizationFieldsStub        func() models.OrganizationFields
    23  	getOrganizationFieldsMutex       sync.RWMutex
    24  	getOrganizationFieldsArgsForCall []struct {
    25  	}
    26  	getOrganizationFieldsReturns struct {
    27  		result1 models.OrganizationFields
    28  	}
    29  	getOrganizationFieldsReturnsOnCall map[int]struct {
    30  		result1 models.OrganizationFields
    31  	}
    32  	invocations      map[string][][]interface{}
    33  	invocationsMutex sync.RWMutex
    34  }
    35  
    36  func (fake *FakeTargetedOrgRequirement) Execute() error {
    37  	fake.executeMutex.Lock()
    38  	ret, specificReturn := fake.executeReturnsOnCall[len(fake.executeArgsForCall)]
    39  	fake.executeArgsForCall = append(fake.executeArgsForCall, struct {
    40  	}{})
    41  	fake.recordInvocation("Execute", []interface{}{})
    42  	fake.executeMutex.Unlock()
    43  	if fake.ExecuteStub != nil {
    44  		return fake.ExecuteStub()
    45  	}
    46  	if specificReturn {
    47  		return ret.result1
    48  	}
    49  	fakeReturns := fake.executeReturns
    50  	return fakeReturns.result1
    51  }
    52  
    53  func (fake *FakeTargetedOrgRequirement) ExecuteCallCount() int {
    54  	fake.executeMutex.RLock()
    55  	defer fake.executeMutex.RUnlock()
    56  	return len(fake.executeArgsForCall)
    57  }
    58  
    59  func (fake *FakeTargetedOrgRequirement) ExecuteCalls(stub func() error) {
    60  	fake.executeMutex.Lock()
    61  	defer fake.executeMutex.Unlock()
    62  	fake.ExecuteStub = stub
    63  }
    64  
    65  func (fake *FakeTargetedOrgRequirement) ExecuteReturns(result1 error) {
    66  	fake.executeMutex.Lock()
    67  	defer fake.executeMutex.Unlock()
    68  	fake.ExecuteStub = nil
    69  	fake.executeReturns = struct {
    70  		result1 error
    71  	}{result1}
    72  }
    73  
    74  func (fake *FakeTargetedOrgRequirement) ExecuteReturnsOnCall(i int, result1 error) {
    75  	fake.executeMutex.Lock()
    76  	defer fake.executeMutex.Unlock()
    77  	fake.ExecuteStub = nil
    78  	if fake.executeReturnsOnCall == nil {
    79  		fake.executeReturnsOnCall = make(map[int]struct {
    80  			result1 error
    81  		})
    82  	}
    83  	fake.executeReturnsOnCall[i] = struct {
    84  		result1 error
    85  	}{result1}
    86  }
    87  
    88  func (fake *FakeTargetedOrgRequirement) GetOrganizationFields() models.OrganizationFields {
    89  	fake.getOrganizationFieldsMutex.Lock()
    90  	ret, specificReturn := fake.getOrganizationFieldsReturnsOnCall[len(fake.getOrganizationFieldsArgsForCall)]
    91  	fake.getOrganizationFieldsArgsForCall = append(fake.getOrganizationFieldsArgsForCall, struct {
    92  	}{})
    93  	fake.recordInvocation("GetOrganizationFields", []interface{}{})
    94  	fake.getOrganizationFieldsMutex.Unlock()
    95  	if fake.GetOrganizationFieldsStub != nil {
    96  		return fake.GetOrganizationFieldsStub()
    97  	}
    98  	if specificReturn {
    99  		return ret.result1
   100  	}
   101  	fakeReturns := fake.getOrganizationFieldsReturns
   102  	return fakeReturns.result1
   103  }
   104  
   105  func (fake *FakeTargetedOrgRequirement) GetOrganizationFieldsCallCount() int {
   106  	fake.getOrganizationFieldsMutex.RLock()
   107  	defer fake.getOrganizationFieldsMutex.RUnlock()
   108  	return len(fake.getOrganizationFieldsArgsForCall)
   109  }
   110  
   111  func (fake *FakeTargetedOrgRequirement) GetOrganizationFieldsCalls(stub func() models.OrganizationFields) {
   112  	fake.getOrganizationFieldsMutex.Lock()
   113  	defer fake.getOrganizationFieldsMutex.Unlock()
   114  	fake.GetOrganizationFieldsStub = stub
   115  }
   116  
   117  func (fake *FakeTargetedOrgRequirement) GetOrganizationFieldsReturns(result1 models.OrganizationFields) {
   118  	fake.getOrganizationFieldsMutex.Lock()
   119  	defer fake.getOrganizationFieldsMutex.Unlock()
   120  	fake.GetOrganizationFieldsStub = nil
   121  	fake.getOrganizationFieldsReturns = struct {
   122  		result1 models.OrganizationFields
   123  	}{result1}
   124  }
   125  
   126  func (fake *FakeTargetedOrgRequirement) GetOrganizationFieldsReturnsOnCall(i int, result1 models.OrganizationFields) {
   127  	fake.getOrganizationFieldsMutex.Lock()
   128  	defer fake.getOrganizationFieldsMutex.Unlock()
   129  	fake.GetOrganizationFieldsStub = nil
   130  	if fake.getOrganizationFieldsReturnsOnCall == nil {
   131  		fake.getOrganizationFieldsReturnsOnCall = make(map[int]struct {
   132  			result1 models.OrganizationFields
   133  		})
   134  	}
   135  	fake.getOrganizationFieldsReturnsOnCall[i] = struct {
   136  		result1 models.OrganizationFields
   137  	}{result1}
   138  }
   139  
   140  func (fake *FakeTargetedOrgRequirement) Invocations() map[string][][]interface{} {
   141  	fake.invocationsMutex.RLock()
   142  	defer fake.invocationsMutex.RUnlock()
   143  	fake.executeMutex.RLock()
   144  	defer fake.executeMutex.RUnlock()
   145  	fake.getOrganizationFieldsMutex.RLock()
   146  	defer fake.getOrganizationFieldsMutex.RUnlock()
   147  	copiedInvocations := map[string][][]interface{}{}
   148  	for key, value := range fake.invocations {
   149  		copiedInvocations[key] = value
   150  	}
   151  	return copiedInvocations
   152  }
   153  
   154  func (fake *FakeTargetedOrgRequirement) recordInvocation(key string, args []interface{}) {
   155  	fake.invocationsMutex.Lock()
   156  	defer fake.invocationsMutex.Unlock()
   157  	if fake.invocations == nil {
   158  		fake.invocations = map[string][][]interface{}{}
   159  	}
   160  	if fake.invocations[key] == nil {
   161  		fake.invocations[key] = [][]interface{}{}
   162  	}
   163  	fake.invocations[key] = append(fake.invocations[key], args)
   164  }
   165  
   166  var _ requirements.TargetedOrgRequirement = new(FakeTargetedOrgRequirement)