forked from coyim/coyim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mocks.go
166 lines (127 loc) · 4.74 KB
/
mocks.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
160
161
162
163
164
165
166
package mocks
import (
"bytes"
"io"
"time"
"github.com/twstrike/coyim/client"
"github.com/twstrike/coyim/config"
"github.com/twstrike/coyim/event"
"github.com/twstrike/coyim/roster"
"github.com/twstrike/coyim/session/access"
"github.com/twstrike/coyim/tls"
"github.com/twstrike/coyim/xmpp/data"
xi "github.com/twstrike/coyim/xmpp/interfaces"
"github.com/twstrike/otr3"
)
// SessionMock is a mock of the Session interface
type SessionMock struct{}
// ApprovePresenceSubscription is the implementation for Session interface
func (*SessionMock) ApprovePresenceSubscription(string, string) error {
return nil
}
// AwaitVersionReply is the implementation for Session interface
func (*SessionMock) AwaitVersionReply(<-chan data.Stanza, string) {}
// Close is the implementation for Session interface
func (*SessionMock) Close() {}
// AutoApprove is the implementation for Session interface
func (*SessionMock) AutoApprove(string) {}
// CommandManager is the implementation for Session interface
func (*SessionMock) CommandManager() client.CommandManager {
return nil
}
// Config is the implementation for Session interface
func (*SessionMock) Config() *config.ApplicationConfig {
return nil
}
// Conn is the implementation for Session interface
func (*SessionMock) Conn() xi.Conn {
return nil
}
// Connect is the implementation for Session interface
func (*SessionMock) Connect(string, tls.Verifier) error {
return nil
}
// ConversationManager is the implementation for Session interface
func (*SessionMock) ConversationManager() client.ConversationManager {
return nil
}
// DenyPresenceSubscription is the implementation for Session interface
func (*SessionMock) DenyPresenceSubscription(string, string) error {
return nil
}
// DisplayName is the implementation for Session interface
func (*SessionMock) DisplayName() string {
return ""
}
// EncryptAndSendTo is the implementation for Session interface
func (*SessionMock) EncryptAndSendTo(string, string, string) (int, bool, error) {
return 0, false, nil
}
// GetConfig is the implementation for Session interface
func (*SessionMock) GetConfig() *config.Account {
return nil
}
// GetInMemoryLog is the implementation for Session interface
func (*SessionMock) GetInMemoryLog() *bytes.Buffer {
return nil
}
// GroupDelimiter is the implementation for Session interface
func (*SessionMock) GroupDelimiter() string {
return ""
}
// HandleConfirmOrDeny is the implementation for Session interface
func (*SessionMock) HandleConfirmOrDeny(string, bool) {}
// IsConnected is the implementation for Session interface
func (*SessionMock) IsConnected() bool {
return false
}
// IsDisconnected is the implementation for Session interface
func (*SessionMock) IsDisconnected() bool {
return false
}
// ManuallyEndEncryptedChat is the implementation for Session interface
func (*SessionMock) ManuallyEndEncryptedChat(string, string) error {
return nil
}
// OtrEventHandler is the implementation for Session interface
func (*SessionMock) OtrEventHandler() map[string]*event.OtrEventHandler {
return nil
}
// PrivateKeys is the implementation for Session interface
func (*SessionMock) PrivateKeys() []otr3.PrivateKey {
return nil
}
// R is the implementation for Session interface
func (*SessionMock) R() *roster.List {
return nil
}
// ReloadKeys is the implementation for Session interface
func (*SessionMock) ReloadKeys() {}
// RemoveContact is the implementation for Session interface
func (*SessionMock) RemoveContact(string) {}
// RequestPresenceSubscription is the implementation for Session interface
func (*SessionMock) RequestPresenceSubscription(string, string) error {
return nil
}
// Send is the implementation for Session interface
func (*SessionMock) Send(string, string, string) error {
return nil
}
// SendPing is the implementation for Session interface
func (*SessionMock) SendPing() {}
// SetCommandManager is the implementation for Session interface
func (*SessionMock) SetCommandManager(client.CommandManager) {}
// SetConnectionLogger is the implementation for Session interface
func (*SessionMock) SetConnectionLogger(io.Writer) {}
// SetConnector is the implementation for Session interface
func (*SessionMock) SetConnector(access.Connector) {}
// SetLastActionTime is the implementation for Session interface
func (*SessionMock) SetLastActionTime(time.Time) {}
// SetSessionEventHandler is the implementation for Session interface
func (*SessionMock) SetSessionEventHandler(access.EventHandler) {}
// SetWantToBeOnline is the implementation for Session interface
func (*SessionMock) SetWantToBeOnline(bool) {}
// Subscribe is the implementation for Session interface
func (*SessionMock) Subscribe(chan<- interface{}) {}
// Timeout is the implementation for Session interface
func (*SessionMock) Timeout(data.Cookie, time.Time) {}