github.com/liamawhite/cli-with-i18n@v6.32.1-0.20171122084555-dede0a5c3448+incompatible/command/v3/v3fakes/fake_v3create_app_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 FakeV3CreateAppActor 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  	CreateApplicationInSpaceStub        func(app v3action.Application, spaceGUID string) (v3action.Application, v3action.Warnings, error)
    22  	createApplicationInSpaceMutex       sync.RWMutex
    23  	createApplicationInSpaceArgsForCall []struct {
    24  		app       v3action.Application
    25  		spaceGUID string
    26  	}
    27  	createApplicationInSpaceReturns struct {
    28  		result1 v3action.Application
    29  		result2 v3action.Warnings
    30  		result3 error
    31  	}
    32  	createApplicationInSpaceReturnsOnCall map[int]struct {
    33  		result1 v3action.Application
    34  		result2 v3action.Warnings
    35  		result3 error
    36  	}
    37  	invocations      map[string][][]interface{}
    38  	invocationsMutex sync.RWMutex
    39  }
    40  
    41  func (fake *FakeV3CreateAppActor) 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 *FakeV3CreateAppActor) CloudControllerAPIVersionCallCount() int {
    57  	fake.cloudControllerAPIVersionMutex.RLock()
    58  	defer fake.cloudControllerAPIVersionMutex.RUnlock()
    59  	return len(fake.cloudControllerAPIVersionArgsForCall)
    60  }
    61  
    62  func (fake *FakeV3CreateAppActor) CloudControllerAPIVersionReturns(result1 string) {
    63  	fake.CloudControllerAPIVersionStub = nil
    64  	fake.cloudControllerAPIVersionReturns = struct {
    65  		result1 string
    66  	}{result1}
    67  }
    68  
    69  func (fake *FakeV3CreateAppActor) 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 *FakeV3CreateAppActor) CreateApplicationInSpace(app v3action.Application, spaceGUID string) (v3action.Application, v3action.Warnings, error) {
    82  	fake.createApplicationInSpaceMutex.Lock()
    83  	ret, specificReturn := fake.createApplicationInSpaceReturnsOnCall[len(fake.createApplicationInSpaceArgsForCall)]
    84  	fake.createApplicationInSpaceArgsForCall = append(fake.createApplicationInSpaceArgsForCall, struct {
    85  		app       v3action.Application
    86  		spaceGUID string
    87  	}{app, spaceGUID})
    88  	fake.recordInvocation("CreateApplicationInSpace", []interface{}{app, spaceGUID})
    89  	fake.createApplicationInSpaceMutex.Unlock()
    90  	if fake.CreateApplicationInSpaceStub != nil {
    91  		return fake.CreateApplicationInSpaceStub(app, spaceGUID)
    92  	}
    93  	if specificReturn {
    94  		return ret.result1, ret.result2, ret.result3
    95  	}
    96  	return fake.createApplicationInSpaceReturns.result1, fake.createApplicationInSpaceReturns.result2, fake.createApplicationInSpaceReturns.result3
    97  }
    98  
    99  func (fake *FakeV3CreateAppActor) CreateApplicationInSpaceCallCount() int {
   100  	fake.createApplicationInSpaceMutex.RLock()
   101  	defer fake.createApplicationInSpaceMutex.RUnlock()
   102  	return len(fake.createApplicationInSpaceArgsForCall)
   103  }
   104  
   105  func (fake *FakeV3CreateAppActor) CreateApplicationInSpaceArgsForCall(i int) (v3action.Application, string) {
   106  	fake.createApplicationInSpaceMutex.RLock()
   107  	defer fake.createApplicationInSpaceMutex.RUnlock()
   108  	return fake.createApplicationInSpaceArgsForCall[i].app, fake.createApplicationInSpaceArgsForCall[i].spaceGUID
   109  }
   110  
   111  func (fake *FakeV3CreateAppActor) CreateApplicationInSpaceReturns(result1 v3action.Application, result2 v3action.Warnings, result3 error) {
   112  	fake.CreateApplicationInSpaceStub = nil
   113  	fake.createApplicationInSpaceReturns = struct {
   114  		result1 v3action.Application
   115  		result2 v3action.Warnings
   116  		result3 error
   117  	}{result1, result2, result3}
   118  }
   119  
   120  func (fake *FakeV3CreateAppActor) CreateApplicationInSpaceReturnsOnCall(i int, result1 v3action.Application, result2 v3action.Warnings, result3 error) {
   121  	fake.CreateApplicationInSpaceStub = nil
   122  	if fake.createApplicationInSpaceReturnsOnCall == nil {
   123  		fake.createApplicationInSpaceReturnsOnCall = make(map[int]struct {
   124  			result1 v3action.Application
   125  			result2 v3action.Warnings
   126  			result3 error
   127  		})
   128  	}
   129  	fake.createApplicationInSpaceReturnsOnCall[i] = struct {
   130  		result1 v3action.Application
   131  		result2 v3action.Warnings
   132  		result3 error
   133  	}{result1, result2, result3}
   134  }
   135  
   136  func (fake *FakeV3CreateAppActor) Invocations() map[string][][]interface{} {
   137  	fake.invocationsMutex.RLock()
   138  	defer fake.invocationsMutex.RUnlock()
   139  	fake.cloudControllerAPIVersionMutex.RLock()
   140  	defer fake.cloudControllerAPIVersionMutex.RUnlock()
   141  	fake.createApplicationInSpaceMutex.RLock()
   142  	defer fake.createApplicationInSpaceMutex.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 *FakeV3CreateAppActor) 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.V3CreateAppActor = new(FakeV3CreateAppActor)