github.com/willmadison/cli@v6.40.1-0.20181018160101-29d5937903ff+incompatible/command/v6/v6fakes/fake_isolation_segments_actor.go (about)

     1  // Code generated by counterfeiter. DO NOT EDIT.
     2  package v6fakes
     3  
     4  import (
     5  	sync "sync"
     6  
     7  	v3action "code.cloudfoundry.org/cli/actor/v3action"
     8  	v6 "code.cloudfoundry.org/cli/command/v6"
     9  )
    10  
    11  type FakeIsolationSegmentsActor struct {
    12  	CloudControllerAPIVersionStub        func() string
    13  	cloudControllerAPIVersionMutex       sync.RWMutex
    14  	cloudControllerAPIVersionArgsForCall []struct {
    15  	}
    16  	cloudControllerAPIVersionReturns struct {
    17  		result1 string
    18  	}
    19  	cloudControllerAPIVersionReturnsOnCall map[int]struct {
    20  		result1 string
    21  	}
    22  	GetIsolationSegmentSummariesStub        func() ([]v3action.IsolationSegmentSummary, v3action.Warnings, error)
    23  	getIsolationSegmentSummariesMutex       sync.RWMutex
    24  	getIsolationSegmentSummariesArgsForCall []struct {
    25  	}
    26  	getIsolationSegmentSummariesReturns struct {
    27  		result1 []v3action.IsolationSegmentSummary
    28  		result2 v3action.Warnings
    29  		result3 error
    30  	}
    31  	getIsolationSegmentSummariesReturnsOnCall map[int]struct {
    32  		result1 []v3action.IsolationSegmentSummary
    33  		result2 v3action.Warnings
    34  		result3 error
    35  	}
    36  	invocations      map[string][][]interface{}
    37  	invocationsMutex sync.RWMutex
    38  }
    39  
    40  func (fake *FakeIsolationSegmentsActor) CloudControllerAPIVersion() string {
    41  	fake.cloudControllerAPIVersionMutex.Lock()
    42  	ret, specificReturn := fake.cloudControllerAPIVersionReturnsOnCall[len(fake.cloudControllerAPIVersionArgsForCall)]
    43  	fake.cloudControllerAPIVersionArgsForCall = append(fake.cloudControllerAPIVersionArgsForCall, struct {
    44  	}{})
    45  	fake.recordInvocation("CloudControllerAPIVersion", []interface{}{})
    46  	fake.cloudControllerAPIVersionMutex.Unlock()
    47  	if fake.CloudControllerAPIVersionStub != nil {
    48  		return fake.CloudControllerAPIVersionStub()
    49  	}
    50  	if specificReturn {
    51  		return ret.result1
    52  	}
    53  	fakeReturns := fake.cloudControllerAPIVersionReturns
    54  	return fakeReturns.result1
    55  }
    56  
    57  func (fake *FakeIsolationSegmentsActor) CloudControllerAPIVersionCallCount() int {
    58  	fake.cloudControllerAPIVersionMutex.RLock()
    59  	defer fake.cloudControllerAPIVersionMutex.RUnlock()
    60  	return len(fake.cloudControllerAPIVersionArgsForCall)
    61  }
    62  
    63  func (fake *FakeIsolationSegmentsActor) CloudControllerAPIVersionCalls(stub func() string) {
    64  	fake.cloudControllerAPIVersionMutex.Lock()
    65  	defer fake.cloudControllerAPIVersionMutex.Unlock()
    66  	fake.CloudControllerAPIVersionStub = stub
    67  }
    68  
    69  func (fake *FakeIsolationSegmentsActor) CloudControllerAPIVersionReturns(result1 string) {
    70  	fake.cloudControllerAPIVersionMutex.Lock()
    71  	defer fake.cloudControllerAPIVersionMutex.Unlock()
    72  	fake.CloudControllerAPIVersionStub = nil
    73  	fake.cloudControllerAPIVersionReturns = struct {
    74  		result1 string
    75  	}{result1}
    76  }
    77  
    78  func (fake *FakeIsolationSegmentsActor) CloudControllerAPIVersionReturnsOnCall(i int, result1 string) {
    79  	fake.cloudControllerAPIVersionMutex.Lock()
    80  	defer fake.cloudControllerAPIVersionMutex.Unlock()
    81  	fake.CloudControllerAPIVersionStub = nil
    82  	if fake.cloudControllerAPIVersionReturnsOnCall == nil {
    83  		fake.cloudControllerAPIVersionReturnsOnCall = make(map[int]struct {
    84  			result1 string
    85  		})
    86  	}
    87  	fake.cloudControllerAPIVersionReturnsOnCall[i] = struct {
    88  		result1 string
    89  	}{result1}
    90  }
    91  
    92  func (fake *FakeIsolationSegmentsActor) GetIsolationSegmentSummaries() ([]v3action.IsolationSegmentSummary, v3action.Warnings, error) {
    93  	fake.getIsolationSegmentSummariesMutex.Lock()
    94  	ret, specificReturn := fake.getIsolationSegmentSummariesReturnsOnCall[len(fake.getIsolationSegmentSummariesArgsForCall)]
    95  	fake.getIsolationSegmentSummariesArgsForCall = append(fake.getIsolationSegmentSummariesArgsForCall, struct {
    96  	}{})
    97  	fake.recordInvocation("GetIsolationSegmentSummaries", []interface{}{})
    98  	fake.getIsolationSegmentSummariesMutex.Unlock()
    99  	if fake.GetIsolationSegmentSummariesStub != nil {
   100  		return fake.GetIsolationSegmentSummariesStub()
   101  	}
   102  	if specificReturn {
   103  		return ret.result1, ret.result2, ret.result3
   104  	}
   105  	fakeReturns := fake.getIsolationSegmentSummariesReturns
   106  	return fakeReturns.result1, fakeReturns.result2, fakeReturns.result3
   107  }
   108  
   109  func (fake *FakeIsolationSegmentsActor) GetIsolationSegmentSummariesCallCount() int {
   110  	fake.getIsolationSegmentSummariesMutex.RLock()
   111  	defer fake.getIsolationSegmentSummariesMutex.RUnlock()
   112  	return len(fake.getIsolationSegmentSummariesArgsForCall)
   113  }
   114  
   115  func (fake *FakeIsolationSegmentsActor) GetIsolationSegmentSummariesCalls(stub func() ([]v3action.IsolationSegmentSummary, v3action.Warnings, error)) {
   116  	fake.getIsolationSegmentSummariesMutex.Lock()
   117  	defer fake.getIsolationSegmentSummariesMutex.Unlock()
   118  	fake.GetIsolationSegmentSummariesStub = stub
   119  }
   120  
   121  func (fake *FakeIsolationSegmentsActor) GetIsolationSegmentSummariesReturns(result1 []v3action.IsolationSegmentSummary, result2 v3action.Warnings, result3 error) {
   122  	fake.getIsolationSegmentSummariesMutex.Lock()
   123  	defer fake.getIsolationSegmentSummariesMutex.Unlock()
   124  	fake.GetIsolationSegmentSummariesStub = nil
   125  	fake.getIsolationSegmentSummariesReturns = struct {
   126  		result1 []v3action.IsolationSegmentSummary
   127  		result2 v3action.Warnings
   128  		result3 error
   129  	}{result1, result2, result3}
   130  }
   131  
   132  func (fake *FakeIsolationSegmentsActor) GetIsolationSegmentSummariesReturnsOnCall(i int, result1 []v3action.IsolationSegmentSummary, result2 v3action.Warnings, result3 error) {
   133  	fake.getIsolationSegmentSummariesMutex.Lock()
   134  	defer fake.getIsolationSegmentSummariesMutex.Unlock()
   135  	fake.GetIsolationSegmentSummariesStub = nil
   136  	if fake.getIsolationSegmentSummariesReturnsOnCall == nil {
   137  		fake.getIsolationSegmentSummariesReturnsOnCall = make(map[int]struct {
   138  			result1 []v3action.IsolationSegmentSummary
   139  			result2 v3action.Warnings
   140  			result3 error
   141  		})
   142  	}
   143  	fake.getIsolationSegmentSummariesReturnsOnCall[i] = struct {
   144  		result1 []v3action.IsolationSegmentSummary
   145  		result2 v3action.Warnings
   146  		result3 error
   147  	}{result1, result2, result3}
   148  }
   149  
   150  func (fake *FakeIsolationSegmentsActor) Invocations() map[string][][]interface{} {
   151  	fake.invocationsMutex.RLock()
   152  	defer fake.invocationsMutex.RUnlock()
   153  	fake.cloudControllerAPIVersionMutex.RLock()
   154  	defer fake.cloudControllerAPIVersionMutex.RUnlock()
   155  	fake.getIsolationSegmentSummariesMutex.RLock()
   156  	defer fake.getIsolationSegmentSummariesMutex.RUnlock()
   157  	copiedInvocations := map[string][][]interface{}{}
   158  	for key, value := range fake.invocations {
   159  		copiedInvocations[key] = value
   160  	}
   161  	return copiedInvocations
   162  }
   163  
   164  func (fake *FakeIsolationSegmentsActor) recordInvocation(key string, args []interface{}) {
   165  	fake.invocationsMutex.Lock()
   166  	defer fake.invocationsMutex.Unlock()
   167  	if fake.invocations == nil {
   168  		fake.invocations = map[string][][]interface{}{}
   169  	}
   170  	if fake.invocations[key] == nil {
   171  		fake.invocations[key] = [][]interface{}{}
   172  	}
   173  	fake.invocations[key] = append(fake.invocations[key], args)
   174  }
   175  
   176  var _ v6.IsolationSegmentsActor = new(FakeIsolationSegmentsActor)