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