mock_HandlerFunc.go 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. // Code generated by mockery v2.52.1. DO NOT EDIT.
  2. package oscar
  3. import (
  4. context "context"
  5. io "io"
  6. mock "github.com/stretchr/testify/mock"
  7. state "github.com/mk6i/retro-aim-server/state"
  8. wire "github.com/mk6i/retro-aim-server/wire"
  9. )
  10. // mockHandlerFunc is an autogenerated mock type for the HandlerFunc type
  11. type mockHandlerFunc struct {
  12. mock.Mock
  13. }
  14. type mockHandlerFunc_Expecter struct {
  15. mock *mock.Mock
  16. }
  17. func (_m *mockHandlerFunc) EXPECT() *mockHandlerFunc_Expecter {
  18. return &mockHandlerFunc_Expecter{mock: &_m.Mock}
  19. }
  20. // Execute provides a mock function with given fields: ctx, sess, inFrame, r, rw
  21. func (_m *mockHandlerFunc) Execute(ctx context.Context, sess *state.Session, inFrame wire.SNACFrame, r io.Reader, rw ResponseWriter) error {
  22. ret := _m.Called(ctx, sess, inFrame, r, rw)
  23. if len(ret) == 0 {
  24. panic("no return value specified for Execute")
  25. }
  26. var r0 error
  27. if rf, ok := ret.Get(0).(func(context.Context, *state.Session, wire.SNACFrame, io.Reader, ResponseWriter) error); ok {
  28. r0 = rf(ctx, sess, inFrame, r, rw)
  29. } else {
  30. r0 = ret.Error(0)
  31. }
  32. return r0
  33. }
  34. // mockHandlerFunc_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute'
  35. type mockHandlerFunc_Execute_Call struct {
  36. *mock.Call
  37. }
  38. // Execute is a helper method to define mock.On call
  39. // - ctx context.Context
  40. // - sess *state.Session
  41. // - inFrame wire.SNACFrame
  42. // - r io.Reader
  43. // - rw ResponseWriter
  44. func (_e *mockHandlerFunc_Expecter) Execute(ctx interface{}, sess interface{}, inFrame interface{}, r interface{}, rw interface{}) *mockHandlerFunc_Execute_Call {
  45. return &mockHandlerFunc_Execute_Call{Call: _e.mock.On("Execute", ctx, sess, inFrame, r, rw)}
  46. }
  47. func (_c *mockHandlerFunc_Execute_Call) Run(run func(ctx context.Context, sess *state.Session, inFrame wire.SNACFrame, r io.Reader, rw ResponseWriter)) *mockHandlerFunc_Execute_Call {
  48. _c.Call.Run(func(args mock.Arguments) {
  49. run(args[0].(context.Context), args[1].(*state.Session), args[2].(wire.SNACFrame), args[3].(io.Reader), args[4].(ResponseWriter))
  50. })
  51. return _c
  52. }
  53. func (_c *mockHandlerFunc_Execute_Call) Return(_a0 error) *mockHandlerFunc_Execute_Call {
  54. _c.Call.Return(_a0)
  55. return _c
  56. }
  57. func (_c *mockHandlerFunc_Execute_Call) RunAndReturn(run func(context.Context, *state.Session, wire.SNACFrame, io.Reader, ResponseWriter) error) *mockHandlerFunc_Execute_Call {
  58. _c.Call.Return(run)
  59. return _c
  60. }
  61. // newMockHandlerFunc creates a new instance of mockHandlerFunc. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
  62. // The first argument is typically a *testing.T value.
  63. func newMockHandlerFunc(t interface {
  64. mock.TestingT
  65. Cleanup(func())
  66. }) *mockHandlerFunc {
  67. mock := &mockHandlerFunc{}
  68. mock.Mock.Test(t)
  69. t.Cleanup(func() { mock.AssertExpectations(t) })
  70. return mock
  71. }