github.com/projecteru2/core@v0.0.0-20240321043226-06bcc1c23f58/3rdmocks/ServerStream.go (about)

     1  // Code generated by mockery v2.31.4. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import (
     6  	context "context"
     7  
     8  	metadata "google.golang.org/grpc/metadata"
     9  
    10  	mock "github.com/stretchr/testify/mock"
    11  )
    12  
    13  // ServerStream is an autogenerated mock type for the ServerStream type
    14  type ServerStream struct {
    15  	mock.Mock
    16  }
    17  
    18  // Context provides a mock function with given fields:
    19  func (_m *ServerStream) Context() context.Context {
    20  	ret := _m.Called()
    21  
    22  	var r0 context.Context
    23  	if rf, ok := ret.Get(0).(func() context.Context); ok {
    24  		r0 = rf()
    25  	} else {
    26  		if ret.Get(0) != nil {
    27  			r0 = ret.Get(0).(context.Context)
    28  		}
    29  	}
    30  
    31  	return r0
    32  }
    33  
    34  // RecvMsg provides a mock function with given fields: m
    35  func (_m *ServerStream) RecvMsg(m interface{}) error {
    36  	ret := _m.Called(m)
    37  
    38  	var r0 error
    39  	if rf, ok := ret.Get(0).(func(interface{}) error); ok {
    40  		r0 = rf(m)
    41  	} else {
    42  		r0 = ret.Error(0)
    43  	}
    44  
    45  	return r0
    46  }
    47  
    48  // SendHeader provides a mock function with given fields: _a0
    49  func (_m *ServerStream) SendHeader(_a0 metadata.MD) error {
    50  	ret := _m.Called(_a0)
    51  
    52  	var r0 error
    53  	if rf, ok := ret.Get(0).(func(metadata.MD) error); ok {
    54  		r0 = rf(_a0)
    55  	} else {
    56  		r0 = ret.Error(0)
    57  	}
    58  
    59  	return r0
    60  }
    61  
    62  // SendMsg provides a mock function with given fields: m
    63  func (_m *ServerStream) SendMsg(m interface{}) error {
    64  	ret := _m.Called(m)
    65  
    66  	var r0 error
    67  	if rf, ok := ret.Get(0).(func(interface{}) error); ok {
    68  		r0 = rf(m)
    69  	} else {
    70  		r0 = ret.Error(0)
    71  	}
    72  
    73  	return r0
    74  }
    75  
    76  // SetHeader provides a mock function with given fields: _a0
    77  func (_m *ServerStream) SetHeader(_a0 metadata.MD) error {
    78  	ret := _m.Called(_a0)
    79  
    80  	var r0 error
    81  	if rf, ok := ret.Get(0).(func(metadata.MD) error); ok {
    82  		r0 = rf(_a0)
    83  	} else {
    84  		r0 = ret.Error(0)
    85  	}
    86  
    87  	return r0
    88  }
    89  
    90  // SetTrailer provides a mock function with given fields: _a0
    91  func (_m *ServerStream) SetTrailer(_a0 metadata.MD) {
    92  	_m.Called(_a0)
    93  }
    94  
    95  // NewServerStream creates a new instance of ServerStream. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    96  // The first argument is typically a *testing.T value.
    97  func NewServerStream(t interface {
    98  	mock.TestingT
    99  	Cleanup(func())
   100  }) *ServerStream {
   101  	mock := &ServerStream{}
   102  	mock.Mock.Test(t)
   103  
   104  	t.Cleanup(func() { mock.AssertExpectations(t) })
   105  
   106  	return mock
   107  }