trpc.group/trpc-go/trpc-go@v1.0.3/testdata/trpc/helloworld/greeter_mock.go (about)

     1  //
     2  //
     3  // Tencent is pleased to support the open source community by making tRPC available.
     4  //
     5  // Copyright (C) 2023 THL A29 Limited, a Tencent company.
     6  // All rights reserved.
     7  //
     8  // If you have downloaded a copy of the tRPC source code from Tencent,
     9  // please note that tRPC source code is licensed under the  Apache 2.0 License,
    10  // A copy of the Apache 2.0 License is included in this file.
    11  //
    12  //
    13  
    14  // Code generated by MockGen. DO NOT EDIT.
    15  // Source: trpc.group/trpc-go/trpc-go/testdata/trpc/helloworld (interfaces: GreeterClientProxy)
    16  
    17  // Package helloworld is a generated GoMock package.
    18  package helloworld
    19  
    20  import (
    21  	context "context"
    22  	reflect "reflect"
    23  
    24  	gomock "github.com/golang/mock/gomock"
    25  
    26  	client "trpc.group/trpc-go/trpc-go/client"
    27  )
    28  
    29  // MockGreeterClientProxy is a mock of GreeterClientProxy interface
    30  type MockGreeterClientProxy struct {
    31  	ctrl     *gomock.Controller
    32  	recorder *MockGreeterClientProxyMockRecorder
    33  }
    34  
    35  // MockGreeterClientProxyMockRecorder is the mock recorder for MockGreeterClientProxy
    36  type MockGreeterClientProxyMockRecorder struct {
    37  	mock *MockGreeterClientProxy
    38  }
    39  
    40  // NewMockGreeterClientProxy creates a new mock instance
    41  func NewMockGreeterClientProxy(ctrl *gomock.Controller) *MockGreeterClientProxy {
    42  	mock := &MockGreeterClientProxy{ctrl: ctrl}
    43  	mock.recorder = &MockGreeterClientProxyMockRecorder{mock}
    44  	return mock
    45  }
    46  
    47  // EXPECT returns an object that allows the caller to indicate expected use
    48  func (m *MockGreeterClientProxy) EXPECT() *MockGreeterClientProxyMockRecorder {
    49  	return m.recorder
    50  }
    51  
    52  // SayHello mocks base method
    53  func (m *MockGreeterClientProxy) SayHello(arg0 context.Context, arg1 *HelloRequest, arg2 ...client.Option) (*HelloReply, error) {
    54  	m.ctrl.T.Helper()
    55  	varargs := []interface{}{arg0, arg1}
    56  	for _, a := range arg2 {
    57  		varargs = append(varargs, a)
    58  	}
    59  	ret := m.ctrl.Call(m, "SayHello", varargs...)
    60  	ret0, _ := ret[0].(*HelloReply)
    61  	ret1, _ := ret[1].(error)
    62  	return ret0, ret1
    63  }
    64  
    65  // SayHello indicates an expected call of SayHello
    66  func (mr *MockGreeterClientProxyMockRecorder) SayHello(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
    67  	mr.mock.ctrl.T.Helper()
    68  	varargs := append([]interface{}{arg0, arg1}, arg2...)
    69  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SayHello", reflect.TypeOf((*MockGreeterClientProxy)(nil).SayHello), varargs...)
    70  }
    71  
    72  // SayHi mocks base method
    73  func (m *MockGreeterClientProxy) SayHi(arg0 context.Context, arg1 *HelloRequest, arg2 ...client.Option) (*HelloReply, error) {
    74  	m.ctrl.T.Helper()
    75  	varargs := []interface{}{arg0, arg1}
    76  	for _, a := range arg2 {
    77  		varargs = append(varargs, a)
    78  	}
    79  	ret := m.ctrl.Call(m, "SayHi", varargs...)
    80  	ret0, _ := ret[0].(*HelloReply)
    81  	ret1, _ := ret[1].(error)
    82  	return ret0, ret1
    83  }
    84  
    85  // SayHi indicates an expected call of SayHi
    86  func (mr *MockGreeterClientProxyMockRecorder) SayHi(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
    87  	mr.mock.ctrl.T.Helper()
    88  	varargs := append([]interface{}{arg0, arg1}, arg2...)
    89  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SayHi", reflect.TypeOf((*MockGreeterClientProxy)(nil).SayHi), varargs...)
    90  }