github.com/mook-as/cf-cli@v7.0.0-beta.28.0.20200120190804-b91c115fae48+incompatible/command/v6/v6fakes/fake_delete_isolation_segment_actor.go (about)

     1  // Code generated by counterfeiter. DO NOT EDIT.
     2  package v6fakes
     3  
     4  import (
     5  	"sync"
     6  
     7  	"code.cloudfoundry.org/cli/actor/v3action"
     8  	v6 "code.cloudfoundry.org/cli/command/v6"
     9  )
    10  
    11  type FakeDeleteIsolationSegmentActor struct {
    12  	DeleteIsolationSegmentByNameStub        func(string) (v3action.Warnings, error)
    13  	deleteIsolationSegmentByNameMutex       sync.RWMutex
    14  	deleteIsolationSegmentByNameArgsForCall []struct {
    15  		arg1 string
    16  	}
    17  	deleteIsolationSegmentByNameReturns struct {
    18  		result1 v3action.Warnings
    19  		result2 error
    20  	}
    21  	deleteIsolationSegmentByNameReturnsOnCall map[int]struct {
    22  		result1 v3action.Warnings
    23  		result2 error
    24  	}
    25  	invocations      map[string][][]interface{}
    26  	invocationsMutex sync.RWMutex
    27  }
    28  
    29  func (fake *FakeDeleteIsolationSegmentActor) DeleteIsolationSegmentByName(arg1 string) (v3action.Warnings, error) {
    30  	fake.deleteIsolationSegmentByNameMutex.Lock()
    31  	ret, specificReturn := fake.deleteIsolationSegmentByNameReturnsOnCall[len(fake.deleteIsolationSegmentByNameArgsForCall)]
    32  	fake.deleteIsolationSegmentByNameArgsForCall = append(fake.deleteIsolationSegmentByNameArgsForCall, struct {
    33  		arg1 string
    34  	}{arg1})
    35  	fake.recordInvocation("DeleteIsolationSegmentByName", []interface{}{arg1})
    36  	fake.deleteIsolationSegmentByNameMutex.Unlock()
    37  	if fake.DeleteIsolationSegmentByNameStub != nil {
    38  		return fake.DeleteIsolationSegmentByNameStub(arg1)
    39  	}
    40  	if specificReturn {
    41  		return ret.result1, ret.result2
    42  	}
    43  	fakeReturns := fake.deleteIsolationSegmentByNameReturns
    44  	return fakeReturns.result1, fakeReturns.result2
    45  }
    46  
    47  func (fake *FakeDeleteIsolationSegmentActor) DeleteIsolationSegmentByNameCallCount() int {
    48  	fake.deleteIsolationSegmentByNameMutex.RLock()
    49  	defer fake.deleteIsolationSegmentByNameMutex.RUnlock()
    50  	return len(fake.deleteIsolationSegmentByNameArgsForCall)
    51  }
    52  
    53  func (fake *FakeDeleteIsolationSegmentActor) DeleteIsolationSegmentByNameCalls(stub func(string) (v3action.Warnings, error)) {
    54  	fake.deleteIsolationSegmentByNameMutex.Lock()
    55  	defer fake.deleteIsolationSegmentByNameMutex.Unlock()
    56  	fake.DeleteIsolationSegmentByNameStub = stub
    57  }
    58  
    59  func (fake *FakeDeleteIsolationSegmentActor) DeleteIsolationSegmentByNameArgsForCall(i int) string {
    60  	fake.deleteIsolationSegmentByNameMutex.RLock()
    61  	defer fake.deleteIsolationSegmentByNameMutex.RUnlock()
    62  	argsForCall := fake.deleteIsolationSegmentByNameArgsForCall[i]
    63  	return argsForCall.arg1
    64  }
    65  
    66  func (fake *FakeDeleteIsolationSegmentActor) DeleteIsolationSegmentByNameReturns(result1 v3action.Warnings, result2 error) {
    67  	fake.deleteIsolationSegmentByNameMutex.Lock()
    68  	defer fake.deleteIsolationSegmentByNameMutex.Unlock()
    69  	fake.DeleteIsolationSegmentByNameStub = nil
    70  	fake.deleteIsolationSegmentByNameReturns = struct {
    71  		result1 v3action.Warnings
    72  		result2 error
    73  	}{result1, result2}
    74  }
    75  
    76  func (fake *FakeDeleteIsolationSegmentActor) DeleteIsolationSegmentByNameReturnsOnCall(i int, result1 v3action.Warnings, result2 error) {
    77  	fake.deleteIsolationSegmentByNameMutex.Lock()
    78  	defer fake.deleteIsolationSegmentByNameMutex.Unlock()
    79  	fake.DeleteIsolationSegmentByNameStub = nil
    80  	if fake.deleteIsolationSegmentByNameReturnsOnCall == nil {
    81  		fake.deleteIsolationSegmentByNameReturnsOnCall = make(map[int]struct {
    82  			result1 v3action.Warnings
    83  			result2 error
    84  		})
    85  	}
    86  	fake.deleteIsolationSegmentByNameReturnsOnCall[i] = struct {
    87  		result1 v3action.Warnings
    88  		result2 error
    89  	}{result1, result2}
    90  }
    91  
    92  func (fake *FakeDeleteIsolationSegmentActor) Invocations() map[string][][]interface{} {
    93  	fake.invocationsMutex.RLock()
    94  	defer fake.invocationsMutex.RUnlock()
    95  	fake.deleteIsolationSegmentByNameMutex.RLock()
    96  	defer fake.deleteIsolationSegmentByNameMutex.RUnlock()
    97  	copiedInvocations := map[string][][]interface{}{}
    98  	for key, value := range fake.invocations {
    99  		copiedInvocations[key] = value
   100  	}
   101  	return copiedInvocations
   102  }
   103  
   104  func (fake *FakeDeleteIsolationSegmentActor) recordInvocation(key string, args []interface{}) {
   105  	fake.invocationsMutex.Lock()
   106  	defer fake.invocationsMutex.Unlock()
   107  	if fake.invocations == nil {
   108  		fake.invocations = map[string][][]interface{}{}
   109  	}
   110  	if fake.invocations[key] == nil {
   111  		fake.invocations[key] = [][]interface{}{}
   112  	}
   113  	fake.invocations[key] = append(fake.invocations[key], args)
   114  }
   115  
   116  var _ v6.DeleteIsolationSegmentActor = new(FakeDeleteIsolationSegmentActor)