github.com/arunkumar7540/cli@v6.45.0+incompatible/command/v7/v7fakes/fake_create_route_actor.go (about)

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