]> git.r.bdr.sh - rbdr/mobius/blame - hotline/client_conn_test.go
Misc cleanup
[rbdr/mobius] / hotline / client_conn_test.go
CommitLineData
6988a057
JH
1package hotline
2
3import (
4 "net"
5 "testing"
6)
7
8func TestClientConn_handleTransaction(t *testing.T) {
9 type fields struct {
10 Connection net.Conn
11 ID *[]byte
12 Icon *[]byte
13 Flags *[]byte
72dd37f1 14 UserName []byte
6988a057 15 Account *Account
61c272e1 16 IdleTime int
6988a057
JH
17 Server *Server
18 Version *[]byte
19 Idle bool
aebc4d36 20 AutoReply []byte
6988a057
JH
21 }
22 type args struct {
23 transaction *Transaction
24 }
25 tests := []struct {
26 name string
27 fields fields
28 args args
29 wantErr bool
30 }{
31 // TODO: Add test cases.
32 }
33 for _, tt := range tests {
34 t.Run(tt.name, func(t *testing.T) {
35 cc := &ClientConn{
36 Connection: tt.fields.Connection,
37 ID: tt.fields.ID,
38 Icon: tt.fields.Icon,
39 Flags: tt.fields.Flags,
40 UserName: tt.fields.UserName,
41 Account: tt.fields.Account,
6988a057
JH
42 Server: tt.fields.Server,
43 Version: tt.fields.Version,
44 Idle: tt.fields.Idle,
45 AutoReply: tt.fields.AutoReply,
46 }
47 if err := cc.handleTransaction(tt.args.transaction); (err != nil) != tt.wantErr {
48 t.Errorf("handleTransaction() error = %v, wantErr %v", err, tt.wantErr)
49 }
50 })
51 }
5c34f875 52}