github.com/willmadison/cli@v6.40.1-0.20181018160101-29d5937903ff+incompatible/command/v6/v6fakes/fake_set_space_isolation_segment_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 FakeSetSpaceIsolationSegmentActor struct {
    12  	AssignIsolationSegmentToSpaceByNameAndSpaceStub        func(string, string) (v3action.Warnings, error)
    13  	assignIsolationSegmentToSpaceByNameAndSpaceMutex       sync.RWMutex
    14  	assignIsolationSegmentToSpaceByNameAndSpaceArgsForCall []struct {
    15  		arg1 string
    16  		arg2 string
    17  	}
    18  	assignIsolationSegmentToSpaceByNameAndSpaceReturns struct {
    19  		result1 v3action.Warnings
    20  		result2 error
    21  	}
    22  	assignIsolationSegmentToSpaceByNameAndSpaceReturnsOnCall map[int]struct {
    23  		result1 v3action.Warnings
    24  		result2 error
    25  	}
    26  	CloudControllerAPIVersionStub        func() string
    27  	cloudControllerAPIVersionMutex       sync.RWMutex
    28  	cloudControllerAPIVersionArgsForCall []struct {
    29  	}
    30  	cloudControllerAPIVersionReturns struct {
    31  		result1 string
    32  	}
    33  	cloudControllerAPIVersionReturnsOnCall map[int]struct {
    34  		result1 string
    35  	}
    36  	invocations      map[string][][]interface{}
    37  	invocationsMutex sync.RWMutex
    38  }
    39  
    40  func (fake *FakeSetSpaceIsolationSegmentActor) AssignIsolationSegmentToSpaceByNameAndSpace(arg1 string, arg2 string) (v3action.Warnings, error) {
    41  	fake.assignIsolationSegmentToSpaceByNameAndSpaceMutex.Lock()
    42  	ret, specificReturn := fake.assignIsolationSegmentToSpaceByNameAndSpaceReturnsOnCall[len(fake.assignIsolationSegmentToSpaceByNameAndSpaceArgsForCall)]
    43  	fake.assignIsolationSegmentToSpaceByNameAndSpaceArgsForCall = append(fake.assignIsolationSegmentToSpaceByNameAndSpaceArgsForCall, struct {
    44  		arg1 string
    45  		arg2 string
    46  	}{arg1, arg2})
    47  	fake.recordInvocation("AssignIsolationSegmentToSpaceByNameAndSpace", []interface{}{arg1, arg2})
    48  	fake.assignIsolationSegmentToSpaceByNameAndSpaceMutex.Unlock()
    49  	if fake.AssignIsolationSegmentToSpaceByNameAndSpaceStub != nil {
    50  		return fake.AssignIsolationSegmentToSpaceByNameAndSpaceStub(arg1, arg2)
    51  	}
    52  	if specificReturn {
    53  		return ret.result1, ret.result2
    54  	}
    55  	fakeReturns := fake.assignIsolationSegmentToSpaceByNameAndSpaceReturns
    56  	return fakeReturns.result1, fakeReturns.result2
    57  }
    58  
    59  func (fake *FakeSetSpaceIsolationSegmentActor) AssignIsolationSegmentToSpaceByNameAndSpaceCallCount() int {
    60  	fake.assignIsolationSegmentToSpaceByNameAndSpaceMutex.RLock()
    61  	defer fake.assignIsolationSegmentToSpaceByNameAndSpaceMutex.RUnlock()
    62  	return len(fake.assignIsolationSegmentToSpaceByNameAndSpaceArgsForCall)
    63  }
    64  
    65  func (fake *FakeSetSpaceIsolationSegmentActor) AssignIsolationSegmentToSpaceByNameAndSpaceCalls(stub func(string, string) (v3action.Warnings, error)) {
    66  	fake.assignIsolationSegmentToSpaceByNameAndSpaceMutex.Lock()
    67  	defer fake.assignIsolationSegmentToSpaceByNameAndSpaceMutex.Unlock()
    68  	fake.AssignIsolationSegmentToSpaceByNameAndSpaceStub = stub
    69  }
    70  
    71  func (fake *FakeSetSpaceIsolationSegmentActor) AssignIsolationSegmentToSpaceByNameAndSpaceArgsForCall(i int) (string, string) {
    72  	fake.assignIsolationSegmentToSpaceByNameAndSpaceMutex.RLock()
    73  	defer fake.assignIsolationSegmentToSpaceByNameAndSpaceMutex.RUnlock()
    74  	argsForCall := fake.assignIsolationSegmentToSpaceByNameAndSpaceArgsForCall[i]
    75  	return argsForCall.arg1, argsForCall.arg2
    76  }
    77  
    78  func (fake *FakeSetSpaceIsolationSegmentActor) AssignIsolationSegmentToSpaceByNameAndSpaceReturns(result1 v3action.Warnings, result2 error) {
    79  	fake.assignIsolationSegmentToSpaceByNameAndSpaceMutex.Lock()
    80  	defer fake.assignIsolationSegmentToSpaceByNameAndSpaceMutex.Unlock()
    81  	fake.AssignIsolationSegmentToSpaceByNameAndSpaceStub = nil
    82  	fake.assignIsolationSegmentToSpaceByNameAndSpaceReturns = struct {
    83  		result1 v3action.Warnings
    84  		result2 error
    85  	}{result1, result2}
    86  }
    87  
    88  func (fake *FakeSetSpaceIsolationSegmentActor) AssignIsolationSegmentToSpaceByNameAndSpaceReturnsOnCall(i int, result1 v3action.Warnings, result2 error) {
    89  	fake.assignIsolationSegmentToSpaceByNameAndSpaceMutex.Lock()
    90  	defer fake.assignIsolationSegmentToSpaceByNameAndSpaceMutex.Unlock()
    91  	fake.AssignIsolationSegmentToSpaceByNameAndSpaceStub = nil
    92  	if fake.assignIsolationSegmentToSpaceByNameAndSpaceReturnsOnCall == nil {
    93  		fake.assignIsolationSegmentToSpaceByNameAndSpaceReturnsOnCall = make(map[int]struct {
    94  			result1 v3action.Warnings
    95  			result2 error
    96  		})
    97  	}
    98  	fake.assignIsolationSegmentToSpaceByNameAndSpaceReturnsOnCall[i] = struct {
    99  		result1 v3action.Warnings
   100  		result2 error
   101  	}{result1, result2}
   102  }
   103  
   104  func (fake *FakeSetSpaceIsolationSegmentActor) CloudControllerAPIVersion() string {
   105  	fake.cloudControllerAPIVersionMutex.Lock()
   106  	ret, specificReturn := fake.cloudControllerAPIVersionReturnsOnCall[len(fake.cloudControllerAPIVersionArgsForCall)]
   107  	fake.cloudControllerAPIVersionArgsForCall = append(fake.cloudControllerAPIVersionArgsForCall, struct {
   108  	}{})
   109  	fake.recordInvocation("CloudControllerAPIVersion", []interface{}{})
   110  	fake.cloudControllerAPIVersionMutex.Unlock()
   111  	if fake.CloudControllerAPIVersionStub != nil {
   112  		return fake.CloudControllerAPIVersionStub()
   113  	}
   114  	if specificReturn {
   115  		return ret.result1
   116  	}
   117  	fakeReturns := fake.cloudControllerAPIVersionReturns
   118  	return fakeReturns.result1
   119  }
   120  
   121  func (fake *FakeSetSpaceIsolationSegmentActor) CloudControllerAPIVersionCallCount() int {
   122  	fake.cloudControllerAPIVersionMutex.RLock()
   123  	defer fake.cloudControllerAPIVersionMutex.RUnlock()
   124  	return len(fake.cloudControllerAPIVersionArgsForCall)
   125  }
   126  
   127  func (fake *FakeSetSpaceIsolationSegmentActor) CloudControllerAPIVersionCalls(stub func() string) {
   128  	fake.cloudControllerAPIVersionMutex.Lock()
   129  	defer fake.cloudControllerAPIVersionMutex.Unlock()
   130  	fake.CloudControllerAPIVersionStub = stub
   131  }
   132  
   133  func (fake *FakeSetSpaceIsolationSegmentActor) CloudControllerAPIVersionReturns(result1 string) {
   134  	fake.cloudControllerAPIVersionMutex.Lock()
   135  	defer fake.cloudControllerAPIVersionMutex.Unlock()
   136  	fake.CloudControllerAPIVersionStub = nil
   137  	fake.cloudControllerAPIVersionReturns = struct {
   138  		result1 string
   139  	}{result1}
   140  }
   141  
   142  func (fake *FakeSetSpaceIsolationSegmentActor) CloudControllerAPIVersionReturnsOnCall(i int, result1 string) {
   143  	fake.cloudControllerAPIVersionMutex.Lock()
   144  	defer fake.cloudControllerAPIVersionMutex.Unlock()
   145  	fake.CloudControllerAPIVersionStub = nil
   146  	if fake.cloudControllerAPIVersionReturnsOnCall == nil {
   147  		fake.cloudControllerAPIVersionReturnsOnCall = make(map[int]struct {
   148  			result1 string
   149  		})
   150  	}
   151  	fake.cloudControllerAPIVersionReturnsOnCall[i] = struct {
   152  		result1 string
   153  	}{result1}
   154  }
   155  
   156  func (fake *FakeSetSpaceIsolationSegmentActor) Invocations() map[string][][]interface{} {
   157  	fake.invocationsMutex.RLock()
   158  	defer fake.invocationsMutex.RUnlock()
   159  	fake.assignIsolationSegmentToSpaceByNameAndSpaceMutex.RLock()
   160  	defer fake.assignIsolationSegmentToSpaceByNameAndSpaceMutex.RUnlock()
   161  	fake.cloudControllerAPIVersionMutex.RLock()
   162  	defer fake.cloudControllerAPIVersionMutex.RUnlock()
   163  	copiedInvocations := map[string][][]interface{}{}
   164  	for key, value := range fake.invocations {
   165  		copiedInvocations[key] = value
   166  	}
   167  	return copiedInvocations
   168  }
   169  
   170  func (fake *FakeSetSpaceIsolationSegmentActor) recordInvocation(key string, args []interface{}) {
   171  	fake.invocationsMutex.Lock()
   172  	defer fake.invocationsMutex.Unlock()
   173  	if fake.invocations == nil {
   174  		fake.invocations = map[string][][]interface{}{}
   175  	}
   176  	if fake.invocations[key] == nil {
   177  		fake.invocations[key] = [][]interface{}{}
   178  	}
   179  	fake.invocations[key] = append(fake.invocations[key], args)
   180  }
   181  
   182  var _ v6.SetSpaceIsolationSegmentActor = new(FakeSetSpaceIsolationSegmentActor)