forked from ava-labs/avalanchego
-
Notifications
You must be signed in to change notification settings - Fork 4
/
mock_server.go
159 lines (135 loc) · 5.41 KB
/
mock_server.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
// Copyright (C) 2019-2022, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/MetalBlockchain/metalgo/api/server (interfaces: Server)
// Package server is a generated GoMock package.
package server
import (
reflect "reflect"
sync "sync"
common "github.com/MetalBlockchain/metalgo/snow/engine/common"
gomock "github.com/golang/mock/gomock"
)
// MockServer is a mock of Server interface.
type MockServer struct {
ctrl *gomock.Controller
recorder *MockServerMockRecorder
}
// MockServerMockRecorder is the mock recorder for MockServer.
type MockServerMockRecorder struct {
mock *MockServer
}
// NewMockServer creates a new mock instance.
func NewMockServer(ctrl *gomock.Controller) *MockServer {
mock := &MockServer{ctrl: ctrl}
mock.recorder = &MockServerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockServer) EXPECT() *MockServerMockRecorder {
return m.recorder
}
// AddAliases mocks base method.
func (m *MockServer) AddAliases(arg0 string, arg1 ...string) error {
m.ctrl.T.Helper()
varargs := []interface{}{arg0}
for _, a := range arg1 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "AddAliases", varargs...)
ret0, _ := ret[0].(error)
return ret0
}
// AddAliases indicates an expected call of AddAliases.
func (mr *MockServerMockRecorder) AddAliases(arg0 interface{}, arg1 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0}, arg1...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddAliases", reflect.TypeOf((*MockServer)(nil).AddAliases), varargs...)
}
// AddAliasesWithReadLock mocks base method.
func (m *MockServer) AddAliasesWithReadLock(arg0 string, arg1 ...string) error {
m.ctrl.T.Helper()
varargs := []interface{}{arg0}
for _, a := range arg1 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "AddAliasesWithReadLock", varargs...)
ret0, _ := ret[0].(error)
return ret0
}
// AddAliasesWithReadLock indicates an expected call of AddAliasesWithReadLock.
func (mr *MockServerMockRecorder) AddAliasesWithReadLock(arg0 interface{}, arg1 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0}, arg1...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddAliasesWithReadLock", reflect.TypeOf((*MockServer)(nil).AddAliasesWithReadLock), varargs...)
}
// AddRoute mocks base method.
func (m *MockServer) AddRoute(arg0 *common.HTTPHandler, arg1 *sync.RWMutex, arg2, arg3 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AddRoute", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(error)
return ret0
}
// AddRoute indicates an expected call of AddRoute.
func (mr *MockServerMockRecorder) AddRoute(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRoute", reflect.TypeOf((*MockServer)(nil).AddRoute), arg0, arg1, arg2, arg3)
}
// AddRouteWithReadLock mocks base method.
func (m *MockServer) AddRouteWithReadLock(arg0 *common.HTTPHandler, arg1 *sync.RWMutex, arg2, arg3 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AddRouteWithReadLock", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(error)
return ret0
}
// AddRouteWithReadLock indicates an expected call of AddRouteWithReadLock.
func (mr *MockServerMockRecorder) AddRouteWithReadLock(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRouteWithReadLock", reflect.TypeOf((*MockServer)(nil).AddRouteWithReadLock), arg0, arg1, arg2, arg3)
}
// Dispatch mocks base method.
func (m *MockServer) Dispatch() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Dispatch")
ret0, _ := ret[0].(error)
return ret0
}
// Dispatch indicates an expected call of Dispatch.
func (mr *MockServerMockRecorder) Dispatch() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dispatch", reflect.TypeOf((*MockServer)(nil).Dispatch))
}
// DispatchTLS mocks base method.
func (m *MockServer) DispatchTLS(arg0, arg1 []byte) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DispatchTLS", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// DispatchTLS indicates an expected call of DispatchTLS.
func (mr *MockServerMockRecorder) DispatchTLS(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DispatchTLS", reflect.TypeOf((*MockServer)(nil).DispatchTLS), arg0, arg1)
}
// RegisterChain mocks base method.
func (m *MockServer) RegisterChain(arg0 string, arg1 common.Engine) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "RegisterChain", arg0, arg1)
}
// RegisterChain indicates an expected call of RegisterChain.
func (mr *MockServerMockRecorder) RegisterChain(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterChain", reflect.TypeOf((*MockServer)(nil).RegisterChain), arg0, arg1)
}
// Shutdown mocks base method.
func (m *MockServer) Shutdown() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Shutdown")
ret0, _ := ret[0].(error)
return ret0
}
// Shutdown indicates an expected call of Shutdown.
func (mr *MockServerMockRecorder) Shutdown() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Shutdown", reflect.TypeOf((*MockServer)(nil).Shutdown))
}