trpc.group/trpc-go/trpc-go@v1.0.3/client/mockclient/client_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: client.go
    16  
    17  // Package mockclient is a generated GoMock package.
    18  package mockclient
    19  
    20  import (
    21  	context "context"
    22  	reflect "reflect"
    23  
    24  	gomock "github.com/golang/mock/gomock"
    25  	client "trpc.group/trpc-go/trpc-go/client"
    26  )
    27  
    28  // MockClient is a mock of Client interface
    29  type MockClient struct {
    30  	ctrl     *gomock.Controller
    31  	recorder *MockClientMockRecorder
    32  }
    33  
    34  // MockClientMockRecorder is the mock recorder for MockClient
    35  type MockClientMockRecorder struct {
    36  	mock *MockClient
    37  }
    38  
    39  // NewMockClient creates a new mock instance
    40  func NewMockClient(ctrl *gomock.Controller) *MockClient {
    41  	mock := &MockClient{ctrl: ctrl}
    42  	mock.recorder = &MockClientMockRecorder{mock}
    43  	return mock
    44  }
    45  
    46  // EXPECT returns an object that allows the caller to indicate expected use
    47  func (m *MockClient) EXPECT() *MockClientMockRecorder {
    48  	return m.recorder
    49  }
    50  
    51  // Invoke mocks base method
    52  func (m *MockClient) Invoke(ctx context.Context, reqBody, rspBody interface{}, opt ...client.Option) error {
    53  	m.ctrl.T.Helper()
    54  	varargs := []interface{}{ctx, reqBody, rspBody}
    55  	for _, a := range opt {
    56  		varargs = append(varargs, a)
    57  	}
    58  	ret := m.ctrl.Call(m, "Invoke", varargs...)
    59  	ret0, _ := ret[0].(error)
    60  	return ret0
    61  }
    62  
    63  // Invoke indicates an expected call of Invoke
    64  func (mr *MockClientMockRecorder) Invoke(ctx, reqBody, rspBody interface{}, opt ...interface{}) *gomock.Call {
    65  	mr.mock.ctrl.T.Helper()
    66  	varargs := append([]interface{}{ctx, reqBody, rspBody}, opt...)
    67  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Invoke", reflect.TypeOf((*MockClient)(nil).Invoke), varargs...)
    68  }