github.com/franc20/ayesa_sap@v7.0.0-beta.28.0.20200124003224-302d4d52fa6c+incompatible/command/v6/v6fakes/fake_v3apps_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 FakeV3AppsActor struct { 12 GetApplicationsWithProcessesBySpaceStub func(string) ([]v3action.ApplicationWithProcessSummary, v3action.Warnings, error) 13 getApplicationsWithProcessesBySpaceMutex sync.RWMutex 14 getApplicationsWithProcessesBySpaceArgsForCall []struct { 15 arg1 string 16 } 17 getApplicationsWithProcessesBySpaceReturns struct { 18 result1 []v3action.ApplicationWithProcessSummary 19 result2 v3action.Warnings 20 result3 error 21 } 22 getApplicationsWithProcessesBySpaceReturnsOnCall map[int]struct { 23 result1 []v3action.ApplicationWithProcessSummary 24 result2 v3action.Warnings 25 result3 error 26 } 27 invocations map[string][][]interface{} 28 invocationsMutex sync.RWMutex 29 } 30 31 func (fake *FakeV3AppsActor) GetApplicationsWithProcessesBySpace(arg1 string) ([]v3action.ApplicationWithProcessSummary, v3action.Warnings, error) { 32 fake.getApplicationsWithProcessesBySpaceMutex.Lock() 33 ret, specificReturn := fake.getApplicationsWithProcessesBySpaceReturnsOnCall[len(fake.getApplicationsWithProcessesBySpaceArgsForCall)] 34 fake.getApplicationsWithProcessesBySpaceArgsForCall = append(fake.getApplicationsWithProcessesBySpaceArgsForCall, struct { 35 arg1 string 36 }{arg1}) 37 fake.recordInvocation("GetApplicationsWithProcessesBySpace", []interface{}{arg1}) 38 fake.getApplicationsWithProcessesBySpaceMutex.Unlock() 39 if fake.GetApplicationsWithProcessesBySpaceStub != nil { 40 return fake.GetApplicationsWithProcessesBySpaceStub(arg1) 41 } 42 if specificReturn { 43 return ret.result1, ret.result2, ret.result3 44 } 45 fakeReturns := fake.getApplicationsWithProcessesBySpaceReturns 46 return fakeReturns.result1, fakeReturns.result2, fakeReturns.result3 47 } 48 49 func (fake *FakeV3AppsActor) GetApplicationsWithProcessesBySpaceCallCount() int { 50 fake.getApplicationsWithProcessesBySpaceMutex.RLock() 51 defer fake.getApplicationsWithProcessesBySpaceMutex.RUnlock() 52 return len(fake.getApplicationsWithProcessesBySpaceArgsForCall) 53 } 54 55 func (fake *FakeV3AppsActor) GetApplicationsWithProcessesBySpaceCalls(stub func(string) ([]v3action.ApplicationWithProcessSummary, v3action.Warnings, error)) { 56 fake.getApplicationsWithProcessesBySpaceMutex.Lock() 57 defer fake.getApplicationsWithProcessesBySpaceMutex.Unlock() 58 fake.GetApplicationsWithProcessesBySpaceStub = stub 59 } 60 61 func (fake *FakeV3AppsActor) GetApplicationsWithProcessesBySpaceArgsForCall(i int) string { 62 fake.getApplicationsWithProcessesBySpaceMutex.RLock() 63 defer fake.getApplicationsWithProcessesBySpaceMutex.RUnlock() 64 argsForCall := fake.getApplicationsWithProcessesBySpaceArgsForCall[i] 65 return argsForCall.arg1 66 } 67 68 func (fake *FakeV3AppsActor) GetApplicationsWithProcessesBySpaceReturns(result1 []v3action.ApplicationWithProcessSummary, result2 v3action.Warnings, result3 error) { 69 fake.getApplicationsWithProcessesBySpaceMutex.Lock() 70 defer fake.getApplicationsWithProcessesBySpaceMutex.Unlock() 71 fake.GetApplicationsWithProcessesBySpaceStub = nil 72 fake.getApplicationsWithProcessesBySpaceReturns = struct { 73 result1 []v3action.ApplicationWithProcessSummary 74 result2 v3action.Warnings 75 result3 error 76 }{result1, result2, result3} 77 } 78 79 func (fake *FakeV3AppsActor) GetApplicationsWithProcessesBySpaceReturnsOnCall(i int, result1 []v3action.ApplicationWithProcessSummary, result2 v3action.Warnings, result3 error) { 80 fake.getApplicationsWithProcessesBySpaceMutex.Lock() 81 defer fake.getApplicationsWithProcessesBySpaceMutex.Unlock() 82 fake.GetApplicationsWithProcessesBySpaceStub = nil 83 if fake.getApplicationsWithProcessesBySpaceReturnsOnCall == nil { 84 fake.getApplicationsWithProcessesBySpaceReturnsOnCall = make(map[int]struct { 85 result1 []v3action.ApplicationWithProcessSummary 86 result2 v3action.Warnings 87 result3 error 88 }) 89 } 90 fake.getApplicationsWithProcessesBySpaceReturnsOnCall[i] = struct { 91 result1 []v3action.ApplicationWithProcessSummary 92 result2 v3action.Warnings 93 result3 error 94 }{result1, result2, result3} 95 } 96 97 func (fake *FakeV3AppsActor) Invocations() map[string][][]interface{} { 98 fake.invocationsMutex.RLock() 99 defer fake.invocationsMutex.RUnlock() 100 fake.getApplicationsWithProcessesBySpaceMutex.RLock() 101 defer fake.getApplicationsWithProcessesBySpaceMutex.RUnlock() 102 copiedInvocations := map[string][][]interface{}{} 103 for key, value := range fake.invocations { 104 copiedInvocations[key] = value 105 } 106 return copiedInvocations 107 } 108 109 func (fake *FakeV3AppsActor) recordInvocation(key string, args []interface{}) { 110 fake.invocationsMutex.Lock() 111 defer fake.invocationsMutex.Unlock() 112 if fake.invocations == nil { 113 fake.invocations = map[string][][]interface{}{} 114 } 115 if fake.invocations[key] == nil { 116 fake.invocations[key] = [][]interface{}{} 117 } 118 fake.invocations[key] = append(fake.invocations[key], args) 119 } 120 121 var _ v6.V3AppsActor = new(FakeV3AppsActor)