github.com/liamawhite/cli-with-i18n@v6.32.1-0.20171122084555-dede0a5c3448+incompatible/command/v3/v3fakes/fake_v3droplets_actor.go (about) 1 // Code generated by counterfeiter. DO NOT EDIT. 2 package v3fakes 3 4 import ( 5 "sync" 6 7 "github.com/liamawhite/cli-with-i18n/actor/v3action" 8 "github.com/liamawhite/cli-with-i18n/command/v3" 9 ) 10 11 type FakeV3DropletsActor struct { 12 CloudControllerAPIVersionStub func() string 13 cloudControllerAPIVersionMutex sync.RWMutex 14 cloudControllerAPIVersionArgsForCall []struct{} 15 cloudControllerAPIVersionReturns struct { 16 result1 string 17 } 18 cloudControllerAPIVersionReturnsOnCall map[int]struct { 19 result1 string 20 } 21 GetApplicationDropletsStub func(appName string, spaceGUID string) ([]v3action.Droplet, v3action.Warnings, error) 22 getApplicationDropletsMutex sync.RWMutex 23 getApplicationDropletsArgsForCall []struct { 24 appName string 25 spaceGUID string 26 } 27 getApplicationDropletsReturns struct { 28 result1 []v3action.Droplet 29 result2 v3action.Warnings 30 result3 error 31 } 32 getApplicationDropletsReturnsOnCall map[int]struct { 33 result1 []v3action.Droplet 34 result2 v3action.Warnings 35 result3 error 36 } 37 invocations map[string][][]interface{} 38 invocationsMutex sync.RWMutex 39 } 40 41 func (fake *FakeV3DropletsActor) CloudControllerAPIVersion() string { 42 fake.cloudControllerAPIVersionMutex.Lock() 43 ret, specificReturn := fake.cloudControllerAPIVersionReturnsOnCall[len(fake.cloudControllerAPIVersionArgsForCall)] 44 fake.cloudControllerAPIVersionArgsForCall = append(fake.cloudControllerAPIVersionArgsForCall, struct{}{}) 45 fake.recordInvocation("CloudControllerAPIVersion", []interface{}{}) 46 fake.cloudControllerAPIVersionMutex.Unlock() 47 if fake.CloudControllerAPIVersionStub != nil { 48 return fake.CloudControllerAPIVersionStub() 49 } 50 if specificReturn { 51 return ret.result1 52 } 53 return fake.cloudControllerAPIVersionReturns.result1 54 } 55 56 func (fake *FakeV3DropletsActor) CloudControllerAPIVersionCallCount() int { 57 fake.cloudControllerAPIVersionMutex.RLock() 58 defer fake.cloudControllerAPIVersionMutex.RUnlock() 59 return len(fake.cloudControllerAPIVersionArgsForCall) 60 } 61 62 func (fake *FakeV3DropletsActor) CloudControllerAPIVersionReturns(result1 string) { 63 fake.CloudControllerAPIVersionStub = nil 64 fake.cloudControllerAPIVersionReturns = struct { 65 result1 string 66 }{result1} 67 } 68 69 func (fake *FakeV3DropletsActor) CloudControllerAPIVersionReturnsOnCall(i int, result1 string) { 70 fake.CloudControllerAPIVersionStub = nil 71 if fake.cloudControllerAPIVersionReturnsOnCall == nil { 72 fake.cloudControllerAPIVersionReturnsOnCall = make(map[int]struct { 73 result1 string 74 }) 75 } 76 fake.cloudControllerAPIVersionReturnsOnCall[i] = struct { 77 result1 string 78 }{result1} 79 } 80 81 func (fake *FakeV3DropletsActor) GetApplicationDroplets(appName string, spaceGUID string) ([]v3action.Droplet, v3action.Warnings, error) { 82 fake.getApplicationDropletsMutex.Lock() 83 ret, specificReturn := fake.getApplicationDropletsReturnsOnCall[len(fake.getApplicationDropletsArgsForCall)] 84 fake.getApplicationDropletsArgsForCall = append(fake.getApplicationDropletsArgsForCall, struct { 85 appName string 86 spaceGUID string 87 }{appName, spaceGUID}) 88 fake.recordInvocation("GetApplicationDroplets", []interface{}{appName, spaceGUID}) 89 fake.getApplicationDropletsMutex.Unlock() 90 if fake.GetApplicationDropletsStub != nil { 91 return fake.GetApplicationDropletsStub(appName, spaceGUID) 92 } 93 if specificReturn { 94 return ret.result1, ret.result2, ret.result3 95 } 96 return fake.getApplicationDropletsReturns.result1, fake.getApplicationDropletsReturns.result2, fake.getApplicationDropletsReturns.result3 97 } 98 99 func (fake *FakeV3DropletsActor) GetApplicationDropletsCallCount() int { 100 fake.getApplicationDropletsMutex.RLock() 101 defer fake.getApplicationDropletsMutex.RUnlock() 102 return len(fake.getApplicationDropletsArgsForCall) 103 } 104 105 func (fake *FakeV3DropletsActor) GetApplicationDropletsArgsForCall(i int) (string, string) { 106 fake.getApplicationDropletsMutex.RLock() 107 defer fake.getApplicationDropletsMutex.RUnlock() 108 return fake.getApplicationDropletsArgsForCall[i].appName, fake.getApplicationDropletsArgsForCall[i].spaceGUID 109 } 110 111 func (fake *FakeV3DropletsActor) GetApplicationDropletsReturns(result1 []v3action.Droplet, result2 v3action.Warnings, result3 error) { 112 fake.GetApplicationDropletsStub = nil 113 fake.getApplicationDropletsReturns = struct { 114 result1 []v3action.Droplet 115 result2 v3action.Warnings 116 result3 error 117 }{result1, result2, result3} 118 } 119 120 func (fake *FakeV3DropletsActor) GetApplicationDropletsReturnsOnCall(i int, result1 []v3action.Droplet, result2 v3action.Warnings, result3 error) { 121 fake.GetApplicationDropletsStub = nil 122 if fake.getApplicationDropletsReturnsOnCall == nil { 123 fake.getApplicationDropletsReturnsOnCall = make(map[int]struct { 124 result1 []v3action.Droplet 125 result2 v3action.Warnings 126 result3 error 127 }) 128 } 129 fake.getApplicationDropletsReturnsOnCall[i] = struct { 130 result1 []v3action.Droplet 131 result2 v3action.Warnings 132 result3 error 133 }{result1, result2, result3} 134 } 135 136 func (fake *FakeV3DropletsActor) Invocations() map[string][][]interface{} { 137 fake.invocationsMutex.RLock() 138 defer fake.invocationsMutex.RUnlock() 139 fake.cloudControllerAPIVersionMutex.RLock() 140 defer fake.cloudControllerAPIVersionMutex.RUnlock() 141 fake.getApplicationDropletsMutex.RLock() 142 defer fake.getApplicationDropletsMutex.RUnlock() 143 copiedInvocations := map[string][][]interface{}{} 144 for key, value := range fake.invocations { 145 copiedInvocations[key] = value 146 } 147 return copiedInvocations 148 } 149 150 func (fake *FakeV3DropletsActor) recordInvocation(key string, args []interface{}) { 151 fake.invocationsMutex.Lock() 152 defer fake.invocationsMutex.Unlock() 153 if fake.invocations == nil { 154 fake.invocations = map[string][][]interface{}{} 155 } 156 if fake.invocations[key] == nil { 157 fake.invocations[key] = [][]interface{}{} 158 } 159 fake.invocations[key] = append(fake.invocations[key], args) 160 } 161 162 var _ v3.V3DropletsActor = new(FakeV3DropletsActor)