aboutsummaryrefslogtreecommitdiff
path: root/hotline/client_conn_test.go
diff options
context:
space:
mode:
authorJeff Halter <868228+jhalter@users.noreply.github.com>2021-07-28 18:21:52 -0700
committerJeff Halter <868228+jhalter@users.noreply.github.com>2021-07-28 14:21:52 -0700
commit22c599abc18895f73e96095f35b71cf3357d41b4 (patch)
tree482ef57d386c955692ea43c43e4655b3c3763499 /hotline/client_conn_test.go
parent71c56068adca18f76ebee86355f000a3e51d3127 (diff)
Move code to hotline dir
Diffstat (limited to 'hotline/client_conn_test.go')
-rw-r--r--hotline/client_conn_test.go53
1 files changed, 53 insertions, 0 deletions
diff --git a/hotline/client_conn_test.go b/hotline/client_conn_test.go
new file mode 100644
index 0000000..d18f9b6
--- /dev/null
+++ b/hotline/client_conn_test.go
@@ -0,0 +1,53 @@
+package hotline
+
+import (
+ "net"
+ "testing"
+)
+
+func TestClientConn_handleTransaction(t *testing.T) {
+ type fields struct {
+ Connection net.Conn
+ ID *[]byte
+ Icon *[]byte
+ Flags *[]byte
+ UserName *[]byte
+ Account *Account
+ IdleTime *int
+ Server *Server
+ Version *[]byte
+ Idle bool
+ AutoReply *[]byte
+ }
+ type args struct {
+ transaction *Transaction
+ }
+ tests := []struct {
+ name string
+ fields fields
+ args args
+ wantErr bool
+ }{
+ // TODO: Add test cases.
+ }
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ cc := &ClientConn{
+ Connection: tt.fields.Connection,
+ ID: tt.fields.ID,
+ Icon: tt.fields.Icon,
+ Flags: tt.fields.Flags,
+ UserName: tt.fields.UserName,
+ Account: tt.fields.Account,
+ IdleTime: tt.fields.IdleTime,
+ Server: tt.fields.Server,
+ Version: tt.fields.Version,
+ Idle: tt.fields.Idle,
+ AutoReply: tt.fields.AutoReply,
+ }
+ if err := cc.handleTransaction(tt.args.transaction); (err != nil) != tt.wantErr {
+ t.Errorf("handleTransaction() error = %v, wantErr %v", err, tt.wantErr)
+ }
+ })
+ }
+} \ No newline at end of file