github.com/nyan233/littlerpc@v0.4.6-0.20230316182519-0c8d5c48abaf/cmd/lrpcurl/mocks/Caller.go (about)

     1  // Code generated by mockery v2.15.0. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import (
     6  	client "github.com/nyan233/littlerpc/core/client"
     7  	mock "github.com/stretchr/testify/mock"
     8  )
     9  
    10  // Caller is an autogenerated mock type for the Caller type
    11  type Caller struct {
    12  	mock.Mock
    13  }
    14  
    15  // RawCall provides a mock function with given fields: service, opts, args
    16  func (_m *Caller) RawCall(service string, opts []client.CallOption, args ...interface{}) ([]interface{}, error) {
    17  	var _ca []interface{}
    18  	_ca = append(_ca, service, opts)
    19  	_ca = append(_ca, args...)
    20  	ret := _m.Called(_ca...)
    21  
    22  	var r0 []interface{}
    23  	if rf, ok := ret.Get(0).(func(string, []client.CallOption, ...interface{}) []interface{}); ok {
    24  		r0 = rf(service, opts, args...)
    25  	} else {
    26  		if ret.Get(0) != nil {
    27  			r0 = ret.Get(0).([]interface{})
    28  		}
    29  	}
    30  
    31  	var r1 error
    32  	if rf, ok := ret.Get(1).(func(string, []client.CallOption, ...interface{}) error); ok {
    33  		r1 = rf(service, opts, args...)
    34  	} else {
    35  		r1 = ret.Error(1)
    36  	}
    37  
    38  	return r0, r1
    39  }
    40  
    41  type mockConstructorTestingTNewCaller interface {
    42  	mock.TestingT
    43  	Cleanup(func())
    44  }
    45  
    46  // NewCaller creates a new instance of Caller. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    47  func NewCaller(t mockConstructorTestingTNewCaller) *Caller {
    48  	mock := &Caller{}
    49  	mock.Mock.Test(t)
    50  
    51  	t.Cleanup(func() { mock.AssertExpectations(t) })
    52  
    53  	return mock
    54  }