github.com/orange-cloudfoundry/cli@v7.1.0+incompatible/command/v6/shared/sharedfakes/fake_v3app_summary_actor.go (about) 1 // Code generated by counterfeiter. DO NOT EDIT. 2 package sharedfakes 3 4 import ( 5 "sync" 6 7 "code.cloudfoundry.org/cli/actor/v3action" 8 "code.cloudfoundry.org/cli/command/v6/shared" 9 ) 10 11 type FakeV3AppSummaryActor struct { 12 GetApplicationSummaryByNameAndSpaceStub func(string, string, bool) (v3action.ApplicationSummary, v3action.Warnings, error) 13 getApplicationSummaryByNameAndSpaceMutex sync.RWMutex 14 getApplicationSummaryByNameAndSpaceArgsForCall []struct { 15 arg1 string 16 arg2 string 17 arg3 bool 18 } 19 getApplicationSummaryByNameAndSpaceReturns struct { 20 result1 v3action.ApplicationSummary 21 result2 v3action.Warnings 22 result3 error 23 } 24 getApplicationSummaryByNameAndSpaceReturnsOnCall map[int]struct { 25 result1 v3action.ApplicationSummary 26 result2 v3action.Warnings 27 result3 error 28 } 29 invocations map[string][][]interface{} 30 invocationsMutex sync.RWMutex 31 } 32 33 func (fake *FakeV3AppSummaryActor) GetApplicationSummaryByNameAndSpace(arg1 string, arg2 string, arg3 bool) (v3action.ApplicationSummary, v3action.Warnings, error) { 34 fake.getApplicationSummaryByNameAndSpaceMutex.Lock() 35 ret, specificReturn := fake.getApplicationSummaryByNameAndSpaceReturnsOnCall[len(fake.getApplicationSummaryByNameAndSpaceArgsForCall)] 36 fake.getApplicationSummaryByNameAndSpaceArgsForCall = append(fake.getApplicationSummaryByNameAndSpaceArgsForCall, struct { 37 arg1 string 38 arg2 string 39 arg3 bool 40 }{arg1, arg2, arg3}) 41 fake.recordInvocation("GetApplicationSummaryByNameAndSpace", []interface{}{arg1, arg2, arg3}) 42 fake.getApplicationSummaryByNameAndSpaceMutex.Unlock() 43 if fake.GetApplicationSummaryByNameAndSpaceStub != nil { 44 return fake.GetApplicationSummaryByNameAndSpaceStub(arg1, arg2, arg3) 45 } 46 if specificReturn { 47 return ret.result1, ret.result2, ret.result3 48 } 49 fakeReturns := fake.getApplicationSummaryByNameAndSpaceReturns 50 return fakeReturns.result1, fakeReturns.result2, fakeReturns.result3 51 } 52 53 func (fake *FakeV3AppSummaryActor) GetApplicationSummaryByNameAndSpaceCallCount() int { 54 fake.getApplicationSummaryByNameAndSpaceMutex.RLock() 55 defer fake.getApplicationSummaryByNameAndSpaceMutex.RUnlock() 56 return len(fake.getApplicationSummaryByNameAndSpaceArgsForCall) 57 } 58 59 func (fake *FakeV3AppSummaryActor) GetApplicationSummaryByNameAndSpaceCalls(stub func(string, string, bool) (v3action.ApplicationSummary, v3action.Warnings, error)) { 60 fake.getApplicationSummaryByNameAndSpaceMutex.Lock() 61 defer fake.getApplicationSummaryByNameAndSpaceMutex.Unlock() 62 fake.GetApplicationSummaryByNameAndSpaceStub = stub 63 } 64 65 func (fake *FakeV3AppSummaryActor) GetApplicationSummaryByNameAndSpaceArgsForCall(i int) (string, string, bool) { 66 fake.getApplicationSummaryByNameAndSpaceMutex.RLock() 67 defer fake.getApplicationSummaryByNameAndSpaceMutex.RUnlock() 68 argsForCall := fake.getApplicationSummaryByNameAndSpaceArgsForCall[i] 69 return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 70 } 71 72 func (fake *FakeV3AppSummaryActor) GetApplicationSummaryByNameAndSpaceReturns(result1 v3action.ApplicationSummary, result2 v3action.Warnings, result3 error) { 73 fake.getApplicationSummaryByNameAndSpaceMutex.Lock() 74 defer fake.getApplicationSummaryByNameAndSpaceMutex.Unlock() 75 fake.GetApplicationSummaryByNameAndSpaceStub = nil 76 fake.getApplicationSummaryByNameAndSpaceReturns = struct { 77 result1 v3action.ApplicationSummary 78 result2 v3action.Warnings 79 result3 error 80 }{result1, result2, result3} 81 } 82 83 func (fake *FakeV3AppSummaryActor) GetApplicationSummaryByNameAndSpaceReturnsOnCall(i int, result1 v3action.ApplicationSummary, result2 v3action.Warnings, result3 error) { 84 fake.getApplicationSummaryByNameAndSpaceMutex.Lock() 85 defer fake.getApplicationSummaryByNameAndSpaceMutex.Unlock() 86 fake.GetApplicationSummaryByNameAndSpaceStub = nil 87 if fake.getApplicationSummaryByNameAndSpaceReturnsOnCall == nil { 88 fake.getApplicationSummaryByNameAndSpaceReturnsOnCall = make(map[int]struct { 89 result1 v3action.ApplicationSummary 90 result2 v3action.Warnings 91 result3 error 92 }) 93 } 94 fake.getApplicationSummaryByNameAndSpaceReturnsOnCall[i] = struct { 95 result1 v3action.ApplicationSummary 96 result2 v3action.Warnings 97 result3 error 98 }{result1, result2, result3} 99 } 100 101 func (fake *FakeV3AppSummaryActor) Invocations() map[string][][]interface{} { 102 fake.invocationsMutex.RLock() 103 defer fake.invocationsMutex.RUnlock() 104 fake.getApplicationSummaryByNameAndSpaceMutex.RLock() 105 defer fake.getApplicationSummaryByNameAndSpaceMutex.RUnlock() 106 copiedInvocations := map[string][][]interface{}{} 107 for key, value := range fake.invocations { 108 copiedInvocations[key] = value 109 } 110 return copiedInvocations 111 } 112 113 func (fake *FakeV3AppSummaryActor) recordInvocation(key string, args []interface{}) { 114 fake.invocationsMutex.Lock() 115 defer fake.invocationsMutex.Unlock() 116 if fake.invocations == nil { 117 fake.invocations = map[string][][]interface{}{} 118 } 119 if fake.invocations[key] == nil { 120 fake.invocations[key] = [][]interface{}{} 121 } 122 fake.invocations[key] = append(fake.invocations[key], args) 123 } 124 125 var _ shared.V3AppSummaryActor = new(FakeV3AppSummaryActor)