-
Notifications
You must be signed in to change notification settings - Fork 2
/
mock_Dispatcher.go
74 lines (58 loc) · 2.23 KB
/
mock_Dispatcher.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// Code generated by mockery v2.42.1. DO NOT EDIT.
//go:build !compile
package mocks
import (
wasabi "github.com/ksysoev/wasabi"
mock "github.com/stretchr/testify/mock"
websocket "nhooyr.io/websocket"
)
// MockDispatcher is an autogenerated mock type for the Dispatcher type
type MockDispatcher struct {
mock.Mock
}
type MockDispatcher_Expecter struct {
mock *mock.Mock
}
func (_m *MockDispatcher) EXPECT() *MockDispatcher_Expecter {
return &MockDispatcher_Expecter{mock: &_m.Mock}
}
// Dispatch provides a mock function with given fields: conn, msgType, data
func (_m *MockDispatcher) Dispatch(conn wasabi.Connection, msgType websocket.MessageType, data []byte) {
_m.Called(conn, msgType, data)
}
// MockDispatcher_Dispatch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Dispatch'
type MockDispatcher_Dispatch_Call struct {
*mock.Call
}
// Dispatch is a helper method to define mock.On call
// - conn wasabi.Connection
// - msgType websocket.MessageType
// - data []byte
func (_e *MockDispatcher_Expecter) Dispatch(conn interface{}, msgType interface{}, data interface{}) *MockDispatcher_Dispatch_Call {
return &MockDispatcher_Dispatch_Call{Call: _e.mock.On("Dispatch", conn, msgType, data)}
}
func (_c *MockDispatcher_Dispatch_Call) Run(run func(conn wasabi.Connection, msgType websocket.MessageType, data []byte)) *MockDispatcher_Dispatch_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(wasabi.Connection), args[1].(websocket.MessageType), args[2].([]byte))
})
return _c
}
func (_c *MockDispatcher_Dispatch_Call) Return() *MockDispatcher_Dispatch_Call {
_c.Call.Return()
return _c
}
func (_c *MockDispatcher_Dispatch_Call) RunAndReturn(run func(wasabi.Connection, websocket.MessageType, []byte)) *MockDispatcher_Dispatch_Call {
_c.Call.Return(run)
return _c
}
// NewMockDispatcher creates a new instance of MockDispatcher. 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 NewMockDispatcher(t interface {
mock.TestingT
Cleanup(func())
}) *MockDispatcher {
mock := &MockDispatcher{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}