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