github.com/ydb-platform/ydb-go-sdk/v3@v3.57.0/internal/topic/topicwriterinternal/writer_stream_interface_mock_test.go (about)

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: writer_stream_interface.go
     3  //
     4  // Generated by this command:
     5  //
     6  //	mockgen -source writer_stream_interface.go -destination writer_stream_interface_mock_test.go -package topicwriterinternal -write_package_comment=false
     7  package topicwriterinternal
     8  
     9  import (
    10  	context "context"
    11  	reflect "reflect"
    12  
    13  	gomock "go.uber.org/mock/gomock"
    14  )
    15  
    16  // MockStreamWriter is a mock of StreamWriter interface.
    17  type MockStreamWriter struct {
    18  	ctrl     *gomock.Controller
    19  	recorder *MockStreamWriterMockRecorder
    20  }
    21  
    22  // MockStreamWriterMockRecorder is the mock recorder for MockStreamWriter.
    23  type MockStreamWriterMockRecorder struct {
    24  	mock *MockStreamWriter
    25  }
    26  
    27  // NewMockStreamWriter creates a new mock instance.
    28  func NewMockStreamWriter(ctrl *gomock.Controller) *MockStreamWriter {
    29  	mock := &MockStreamWriter{ctrl: ctrl}
    30  	mock.recorder = &MockStreamWriterMockRecorder{mock}
    31  	return mock
    32  }
    33  
    34  // EXPECT returns an object that allows the caller to indicate expected use.
    35  func (m *MockStreamWriter) EXPECT() *MockStreamWriterMockRecorder {
    36  	return m.recorder
    37  }
    38  
    39  // Close mocks base method.
    40  func (m *MockStreamWriter) Close(ctx context.Context) error {
    41  	m.ctrl.T.Helper()
    42  	ret := m.ctrl.Call(m, "Close", ctx)
    43  	ret0, _ := ret[0].(error)
    44  	return ret0
    45  }
    46  
    47  // Close indicates an expected call of Close.
    48  func (mr *MockStreamWriterMockRecorder) Close(ctx any) *gomock.Call {
    49  	mr.mock.ctrl.T.Helper()
    50  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockStreamWriter)(nil).Close), ctx)
    51  }
    52  
    53  // WaitInit mocks base method.
    54  func (m *MockStreamWriter) WaitInit(ctx context.Context) (InitialInfo, error) {
    55  	m.ctrl.T.Helper()
    56  	ret := m.ctrl.Call(m, "WaitInit", ctx)
    57  	ret0, _ := ret[0].(InitialInfo)
    58  	ret1, _ := ret[1].(error)
    59  	return ret0, ret1
    60  }
    61  
    62  // WaitInit indicates an expected call of WaitInit.
    63  func (mr *MockStreamWriterMockRecorder) WaitInit(ctx any) *gomock.Call {
    64  	mr.mock.ctrl.T.Helper()
    65  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitInit", reflect.TypeOf((*MockStreamWriter)(nil).WaitInit), ctx)
    66  }
    67  
    68  // Write mocks base method.
    69  func (m *MockStreamWriter) Write(ctx context.Context, messages []PublicMessage) error {
    70  	m.ctrl.T.Helper()
    71  	ret := m.ctrl.Call(m, "Write", ctx, messages)
    72  	ret0, _ := ret[0].(error)
    73  	return ret0
    74  }
    75  
    76  // Write indicates an expected call of Write.
    77  func (mr *MockStreamWriterMockRecorder) Write(ctx, messages any) *gomock.Call {
    78  	mr.mock.ctrl.T.Helper()
    79  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockStreamWriter)(nil).Write), ctx, messages)
    80  }