mock_online_notifier_test.go 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. // Code generated by mockery; DO NOT EDIT.
  2. // github.com/vektra/mockery
  3. // template: testify
  4. package oscar
  5. import (
  6. "github.com/mk6i/open-oscar-server/wire"
  7. mock "github.com/stretchr/testify/mock"
  8. )
  9. // newMockOnlineNotifier creates a new instance of mockOnlineNotifier. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
  10. // The first argument is typically a *testing.T value.
  11. func newMockOnlineNotifier(t interface {
  12. mock.TestingT
  13. Cleanup(func())
  14. }) *mockOnlineNotifier {
  15. mock := &mockOnlineNotifier{}
  16. mock.Mock.Test(t)
  17. t.Cleanup(func() { mock.AssertExpectations(t) })
  18. return mock
  19. }
  20. // mockOnlineNotifier is an autogenerated mock type for the OnlineNotifier type
  21. type mockOnlineNotifier struct {
  22. mock.Mock
  23. }
  24. type mockOnlineNotifier_Expecter struct {
  25. mock *mock.Mock
  26. }
  27. func (_m *mockOnlineNotifier) EXPECT() *mockOnlineNotifier_Expecter {
  28. return &mockOnlineNotifier_Expecter{mock: &_m.Mock}
  29. }
  30. // HostOnline provides a mock function for the type mockOnlineNotifier
  31. func (_mock *mockOnlineNotifier) HostOnline(service uint16) wire.SNACMessage {
  32. ret := _mock.Called(service)
  33. if len(ret) == 0 {
  34. panic("no return value specified for HostOnline")
  35. }
  36. var r0 wire.SNACMessage
  37. if returnFunc, ok := ret.Get(0).(func(uint16) wire.SNACMessage); ok {
  38. r0 = returnFunc(service)
  39. } else {
  40. r0 = ret.Get(0).(wire.SNACMessage)
  41. }
  42. return r0
  43. }
  44. // mockOnlineNotifier_HostOnline_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HostOnline'
  45. type mockOnlineNotifier_HostOnline_Call struct {
  46. *mock.Call
  47. }
  48. // HostOnline is a helper method to define mock.On call
  49. // - service uint16
  50. func (_e *mockOnlineNotifier_Expecter) HostOnline(service interface{}) *mockOnlineNotifier_HostOnline_Call {
  51. return &mockOnlineNotifier_HostOnline_Call{Call: _e.mock.On("HostOnline", service)}
  52. }
  53. func (_c *mockOnlineNotifier_HostOnline_Call) Run(run func(service uint16)) *mockOnlineNotifier_HostOnline_Call {
  54. _c.Call.Run(func(args mock.Arguments) {
  55. var arg0 uint16
  56. if args[0] != nil {
  57. arg0 = args[0].(uint16)
  58. }
  59. run(
  60. arg0,
  61. )
  62. })
  63. return _c
  64. }
  65. func (_c *mockOnlineNotifier_HostOnline_Call) Return(sNACMessage wire.SNACMessage) *mockOnlineNotifier_HostOnline_Call {
  66. _c.Call.Return(sNACMessage)
  67. return _c
  68. }
  69. func (_c *mockOnlineNotifier_HostOnline_Call) RunAndReturn(run func(service uint16) wire.SNACMessage) *mockOnlineNotifier_HostOnline_Call {
  70. _c.Call.Return(run)
  71. return _c
  72. }