// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" mock "github.com/stretchr/testify/mock" ) // NewMockTransport creates a new instance of MockTransport. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewMockTransport(t interface { mock.TestingT Cleanup(func()) }) *MockTransport { mock := &MockTransport{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock } // MockTransport is an autogenerated mock type for the Transport type type MockTransport struct { mock.Mock } type MockTransport_Expecter struct { mock *mock.Mock } func (_m *MockTransport) EXPECT() *MockTransport_Expecter { return &MockTransport_Expecter{mock: &_m.Mock} } // Available provides a mock function for the type MockTransport func (_mock *MockTransport) Available() bool { ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Available") } var r0 bool if returnFunc, ok := ret.Get(0).(func() bool); ok { r0 = returnFunc() } else { r0 = ret.Get(0).(bool) } return r0 } // MockTransport_Available_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Available' type MockTransport_Available_Call struct { *mock.Call } // Available is a helper method to define mock.On call func (_e *MockTransport_Expecter) Available() *MockTransport_Available_Call { return &MockTransport_Available_Call{Call: _e.mock.On("Available")} } func (_c *MockTransport_Available_Call) Run(run func()) *MockTransport_Available_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockTransport_Available_Call) Return(b bool) *MockTransport_Available_Call { _c.Call.Return(b) return _c } func (_c *MockTransport_Available_Call) RunAndReturn(run func() bool) *MockTransport_Available_Call { _c.Call.Return(run) return _c } // Send provides a mock function for the type MockTransport func (_mock *MockTransport) Send(ctx context.Context, body []byte) ([]byte, error) { ret := _mock.Called(ctx, body) if len(ret) == 0 { panic("no return value specified for Send") } var r0 []byte var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, []byte) ([]byte, error)); ok { return returnFunc(ctx, body) } if returnFunc, ok := ret.Get(0).(func(context.Context, []byte) []byte); ok { r0 = returnFunc(ctx, body) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]byte) } } if returnFunc, ok := ret.Get(1).(func(context.Context, []byte) error); ok { r1 = returnFunc(ctx, body) } else { r1 = ret.Error(1) } return r0, r1 } // MockTransport_Send_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Send' type MockTransport_Send_Call struct { *mock.Call } // Send is a helper method to define mock.On call // - ctx context.Context // - body []byte func (_e *MockTransport_Expecter) Send(ctx any, body any) *MockTransport_Send_Call { return &MockTransport_Send_Call{Call: _e.mock.On("Send", ctx, body)} } func (_c *MockTransport_Send_Call) Run(run func(ctx context.Context, body []byte)) *MockTransport_Send_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 []byte if args[1] != nil { arg1 = args[1].([]byte) } run( arg0, arg1, ) }) return _c } func (_c *MockTransport_Send_Call) Return(bytes []byte, err error) *MockTransport_Send_Call { _c.Call.Return(bytes, err) return _c } func (_c *MockTransport_Send_Call) RunAndReturn(run func(ctx context.Context, body []byte) ([]byte, error)) *MockTransport_Send_Call { _c.Call.Return(run) return _c }