github.com/ydb-platform/ydb-go-sdk/v3@v3.89.2/internal/topic/topicreaderinternal/batched_stream_reader_mock_test.go (about)

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: batched_stream_reader_interface.go
     3  //
     4  // Generated by this command:
     5  //
     6  //	mockgen -source batched_stream_reader_interface.go --typed -destination batched_stream_reader_mock_test.go -package topicreaderinternal -write_package_comment=false
     7  package topicreaderinternal
     8  
     9  import (
    10  	context "context"
    11  	reflect "reflect"
    12  
    13  	topicreadercommon "github.com/ydb-platform/ydb-go-sdk/v3/internal/topic/topicreadercommon"
    14  	tx "github.com/ydb-platform/ydb-go-sdk/v3/internal/tx"
    15  	gomock "go.uber.org/mock/gomock"
    16  )
    17  
    18  // MockbatchedStreamReader is a mock of batchedStreamReader interface.
    19  type MockbatchedStreamReader struct {
    20  	ctrl     *gomock.Controller
    21  	recorder *MockbatchedStreamReaderMockRecorder
    22  }
    23  
    24  // MockbatchedStreamReaderMockRecorder is the mock recorder for MockbatchedStreamReader.
    25  type MockbatchedStreamReaderMockRecorder struct {
    26  	mock *MockbatchedStreamReader
    27  }
    28  
    29  // NewMockbatchedStreamReader creates a new mock instance.
    30  func NewMockbatchedStreamReader(ctrl *gomock.Controller) *MockbatchedStreamReader {
    31  	mock := &MockbatchedStreamReader{ctrl: ctrl}
    32  	mock.recorder = &MockbatchedStreamReaderMockRecorder{mock}
    33  	return mock
    34  }
    35  
    36  // EXPECT returns an object that allows the caller to indicate expected use.
    37  func (m *MockbatchedStreamReader) EXPECT() *MockbatchedStreamReaderMockRecorder {
    38  	return m.recorder
    39  }
    40  
    41  // CloseWithError mocks base method.
    42  func (m *MockbatchedStreamReader) CloseWithError(ctx context.Context, err error) error {
    43  	m.ctrl.T.Helper()
    44  	ret := m.ctrl.Call(m, "CloseWithError", ctx, err)
    45  	ret0, _ := ret[0].(error)
    46  	return ret0
    47  }
    48  
    49  // CloseWithError indicates an expected call of CloseWithError.
    50  func (mr *MockbatchedStreamReaderMockRecorder) CloseWithError(ctx, err any) *MockbatchedStreamReaderCloseWithErrorCall {
    51  	mr.mock.ctrl.T.Helper()
    52  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseWithError", reflect.TypeOf((*MockbatchedStreamReader)(nil).CloseWithError), ctx, err)
    53  	return &MockbatchedStreamReaderCloseWithErrorCall{Call: call}
    54  }
    55  
    56  // MockbatchedStreamReaderCloseWithErrorCall wrap *gomock.Call
    57  type MockbatchedStreamReaderCloseWithErrorCall struct {
    58  	*gomock.Call
    59  }
    60  
    61  // Return rewrite *gomock.Call.Return
    62  func (c *MockbatchedStreamReaderCloseWithErrorCall) Return(arg0 error) *MockbatchedStreamReaderCloseWithErrorCall {
    63  	c.Call = c.Call.Return(arg0)
    64  	return c
    65  }
    66  
    67  // Do rewrite *gomock.Call.Do
    68  func (c *MockbatchedStreamReaderCloseWithErrorCall) Do(f func(context.Context, error) error) *MockbatchedStreamReaderCloseWithErrorCall {
    69  	c.Call = c.Call.Do(f)
    70  	return c
    71  }
    72  
    73  // DoAndReturn rewrite *gomock.Call.DoAndReturn
    74  func (c *MockbatchedStreamReaderCloseWithErrorCall) DoAndReturn(f func(context.Context, error) error) *MockbatchedStreamReaderCloseWithErrorCall {
    75  	c.Call = c.Call.DoAndReturn(f)
    76  	return c
    77  }
    78  
    79  // Commit mocks base method.
    80  func (m *MockbatchedStreamReader) Commit(ctx context.Context, commitRange topicreadercommon.CommitRange) error {
    81  	m.ctrl.T.Helper()
    82  	ret := m.ctrl.Call(m, "Commit", ctx, commitRange)
    83  	ret0, _ := ret[0].(error)
    84  	return ret0
    85  }
    86  
    87  // Commit indicates an expected call of Commit.
    88  func (mr *MockbatchedStreamReaderMockRecorder) Commit(ctx, commitRange any) *MockbatchedStreamReaderCommitCall {
    89  	mr.mock.ctrl.T.Helper()
    90  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Commit", reflect.TypeOf((*MockbatchedStreamReader)(nil).Commit), ctx, commitRange)
    91  	return &MockbatchedStreamReaderCommitCall{Call: call}
    92  }
    93  
    94  // MockbatchedStreamReaderCommitCall wrap *gomock.Call
    95  type MockbatchedStreamReaderCommitCall struct {
    96  	*gomock.Call
    97  }
    98  
    99  // Return rewrite *gomock.Call.Return
   100  func (c *MockbatchedStreamReaderCommitCall) Return(arg0 error) *MockbatchedStreamReaderCommitCall {
   101  	c.Call = c.Call.Return(arg0)
   102  	return c
   103  }
   104  
   105  // Do rewrite *gomock.Call.Do
   106  func (c *MockbatchedStreamReaderCommitCall) Do(f func(context.Context, topicreadercommon.CommitRange) error) *MockbatchedStreamReaderCommitCall {
   107  	c.Call = c.Call.Do(f)
   108  	return c
   109  }
   110  
   111  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   112  func (c *MockbatchedStreamReaderCommitCall) DoAndReturn(f func(context.Context, topicreadercommon.CommitRange) error) *MockbatchedStreamReaderCommitCall {
   113  	c.Call = c.Call.DoAndReturn(f)
   114  	return c
   115  }
   116  
   117  // PopMessagesBatchTx mocks base method.
   118  func (m *MockbatchedStreamReader) PopMessagesBatchTx(ctx context.Context, tx tx.Transaction, opts ReadMessageBatchOptions) (*topicreadercommon.PublicBatch, error) {
   119  	m.ctrl.T.Helper()
   120  	ret := m.ctrl.Call(m, "PopMessagesBatchTx", ctx, tx, opts)
   121  	ret0, _ := ret[0].(*topicreadercommon.PublicBatch)
   122  	ret1, _ := ret[1].(error)
   123  	return ret0, ret1
   124  }
   125  
   126  // PopMessagesBatchTx indicates an expected call of PopMessagesBatchTx.
   127  func (mr *MockbatchedStreamReaderMockRecorder) PopMessagesBatchTx(ctx, tx, opts any) *MockbatchedStreamReaderPopMessagesBatchTxCall {
   128  	mr.mock.ctrl.T.Helper()
   129  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PopMessagesBatchTx", reflect.TypeOf((*MockbatchedStreamReader)(nil).PopMessagesBatchTx), ctx, tx, opts)
   130  	return &MockbatchedStreamReaderPopMessagesBatchTxCall{Call: call}
   131  }
   132  
   133  // MockbatchedStreamReaderPopMessagesBatchTxCall wrap *gomock.Call
   134  type MockbatchedStreamReaderPopMessagesBatchTxCall struct {
   135  	*gomock.Call
   136  }
   137  
   138  // Return rewrite *gomock.Call.Return
   139  func (c *MockbatchedStreamReaderPopMessagesBatchTxCall) Return(arg0 *topicreadercommon.PublicBatch, arg1 error) *MockbatchedStreamReaderPopMessagesBatchTxCall {
   140  	c.Call = c.Call.Return(arg0, arg1)
   141  	return c
   142  }
   143  
   144  // Do rewrite *gomock.Call.Do
   145  func (c *MockbatchedStreamReaderPopMessagesBatchTxCall) Do(f func(context.Context, tx.Transaction, ReadMessageBatchOptions) (*topicreadercommon.PublicBatch, error)) *MockbatchedStreamReaderPopMessagesBatchTxCall {
   146  	c.Call = c.Call.Do(f)
   147  	return c
   148  }
   149  
   150  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   151  func (c *MockbatchedStreamReaderPopMessagesBatchTxCall) DoAndReturn(f func(context.Context, tx.Transaction, ReadMessageBatchOptions) (*topicreadercommon.PublicBatch, error)) *MockbatchedStreamReaderPopMessagesBatchTxCall {
   152  	c.Call = c.Call.DoAndReturn(f)
   153  	return c
   154  }
   155  
   156  // ReadMessageBatch mocks base method.
   157  func (m *MockbatchedStreamReader) ReadMessageBatch(ctx context.Context, opts ReadMessageBatchOptions) (*topicreadercommon.PublicBatch, error) {
   158  	m.ctrl.T.Helper()
   159  	ret := m.ctrl.Call(m, "ReadMessageBatch", ctx, opts)
   160  	ret0, _ := ret[0].(*topicreadercommon.PublicBatch)
   161  	ret1, _ := ret[1].(error)
   162  	return ret0, ret1
   163  }
   164  
   165  // ReadMessageBatch indicates an expected call of ReadMessageBatch.
   166  func (mr *MockbatchedStreamReaderMockRecorder) ReadMessageBatch(ctx, opts any) *MockbatchedStreamReaderReadMessageBatchCall {
   167  	mr.mock.ctrl.T.Helper()
   168  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadMessageBatch", reflect.TypeOf((*MockbatchedStreamReader)(nil).ReadMessageBatch), ctx, opts)
   169  	return &MockbatchedStreamReaderReadMessageBatchCall{Call: call}
   170  }
   171  
   172  // MockbatchedStreamReaderReadMessageBatchCall wrap *gomock.Call
   173  type MockbatchedStreamReaderReadMessageBatchCall struct {
   174  	*gomock.Call
   175  }
   176  
   177  // Return rewrite *gomock.Call.Return
   178  func (c *MockbatchedStreamReaderReadMessageBatchCall) Return(arg0 *topicreadercommon.PublicBatch, arg1 error) *MockbatchedStreamReaderReadMessageBatchCall {
   179  	c.Call = c.Call.Return(arg0, arg1)
   180  	return c
   181  }
   182  
   183  // Do rewrite *gomock.Call.Do
   184  func (c *MockbatchedStreamReaderReadMessageBatchCall) Do(f func(context.Context, ReadMessageBatchOptions) (*topicreadercommon.PublicBatch, error)) *MockbatchedStreamReaderReadMessageBatchCall {
   185  	c.Call = c.Call.Do(f)
   186  	return c
   187  }
   188  
   189  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   190  func (c *MockbatchedStreamReaderReadMessageBatchCall) DoAndReturn(f func(context.Context, ReadMessageBatchOptions) (*topicreadercommon.PublicBatch, error)) *MockbatchedStreamReaderReadMessageBatchCall {
   191  	c.Call = c.Call.DoAndReturn(f)
   192  	return c
   193  }
   194  
   195  // WaitInit mocks base method.
   196  func (m *MockbatchedStreamReader) WaitInit(ctx context.Context) error {
   197  	m.ctrl.T.Helper()
   198  	ret := m.ctrl.Call(m, "WaitInit", ctx)
   199  	ret0, _ := ret[0].(error)
   200  	return ret0
   201  }
   202  
   203  // WaitInit indicates an expected call of WaitInit.
   204  func (mr *MockbatchedStreamReaderMockRecorder) WaitInit(ctx any) *MockbatchedStreamReaderWaitInitCall {
   205  	mr.mock.ctrl.T.Helper()
   206  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitInit", reflect.TypeOf((*MockbatchedStreamReader)(nil).WaitInit), ctx)
   207  	return &MockbatchedStreamReaderWaitInitCall{Call: call}
   208  }
   209  
   210  // MockbatchedStreamReaderWaitInitCall wrap *gomock.Call
   211  type MockbatchedStreamReaderWaitInitCall struct {
   212  	*gomock.Call
   213  }
   214  
   215  // Return rewrite *gomock.Call.Return
   216  func (c *MockbatchedStreamReaderWaitInitCall) Return(arg0 error) *MockbatchedStreamReaderWaitInitCall {
   217  	c.Call = c.Call.Return(arg0)
   218  	return c
   219  }
   220  
   221  // Do rewrite *gomock.Call.Do
   222  func (c *MockbatchedStreamReaderWaitInitCall) Do(f func(context.Context) error) *MockbatchedStreamReaderWaitInitCall {
   223  	c.Call = c.Call.Do(f)
   224  	return c
   225  }
   226  
   227  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   228  func (c *MockbatchedStreamReaderWaitInitCall) DoAndReturn(f func(context.Context) error) *MockbatchedStreamReaderWaitInitCall {
   229  	c.Call = c.Call.DoAndReturn(f)
   230  	return c
   231  }