package service import ( "reflect" "testing" ) func TestChatGroupService_ChatGroupAdd(t *testing.T) { type args struct { entId int64 positionId int64 userIdArr []int64 appid string } tests := []struct { name string args args want bool }{ // TODO: Add test cases. { name: "群组新增", args: args{ entId: 15755, positionId: 1204781623, userIdArr: []int64{1204841316}, appid: "10000", }, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { b := ChatGroupService{} if got := b.ChatGroupAdd(tt.args.entId, tt.args.positionId, tt.args.userIdArr, tt.args.appid); got != tt.want { t.Errorf("ChatGroupAdd() = %v, want %v", got, tt.want) } }) } } func TestChatGroupService_ChatGroupJoin(t *testing.T) { type args struct { chatGroupId int64 positionId int64 userIdArr []int64 appid string } tests := []struct { name string args args want bool }{ // TODO: Add test cases. { name: "拉人进群", args: args{ chatGroupId: 3, positionId: 1204781623, userIdArr: []int64{1204841317}, appid: "10000", }, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { b := ChatGroupService{} if got := b.ChatGroupJoin(tt.args.chatGroupId, tt.args.positionId, tt.args.userIdArr, tt.args.appid); got != tt.want { t.Errorf("ChatGroupJoin() = %v, want %v", got, tt.want) } }) } } func TestChatGroupService_ChatGroupList(t *testing.T) { type args struct { entId int64 positionId int64 userName string groupName string appid string } tests := []struct { name string args args want []map[string]interface{} }{ // TODO: Add test cases. {name: "我的群聊列表默认", args: args{ entId: 15755, positionId: 1204781623, userName: "张", groupName: "", appid: "10000", }, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { b := ChatGroupService{} if got := b.ChatGroupList(tt.args.entId, tt.args.positionId, tt.args.userName, tt.args.groupName, tt.args.appid); !reflect.DeepEqual(got, tt.want) { t.Errorf("ChatGroupList() = %v, want %v", got, tt.want) } }) } } func TestChatGroupService_ChatGroupPerson(t *testing.T) { type args struct { ChatGroupId int64 entId int64 appid string } tests := []struct { name string args args want map[string][]map[string]interface{} }{ // TODO: Add test cases. { name: "群成员", args: args{ ChatGroupId: 3, entId: 15755, appid: "10000", }, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { b := ChatGroupService{} if got := b.ChatGroupPerson(tt.args.ChatGroupId, tt.args.entId, tt.args.appid); !reflect.DeepEqual(got, tt.want) { t.Errorf("ChatGroupPerson() = %v, want %v", got, tt.want) } }) } } func TestChatGroupService_GroupNameUpdate(t *testing.T) { type args struct { chatGroupId int64 groupName string appid string } tests := []struct { name string args args want bool }{ // TODO: Add test cases. { name: "表名修改", args: args{ chatGroupId: 3, groupName: "策士", appid: "10000", }, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { b := ChatGroupService{} if got := b.GroupNameUpdate(tt.args.chatGroupId, tt.args.groupName, tt.args.appid); got != tt.want { t.Errorf("GroupNameUpdate() = %v, want %v", got, tt.want) } }) } } func TestChatGroupService_GroupNoticeAdd(t *testing.T) { type args struct { chatGroupId int64 content string appid string } tests := []struct { name string args args want bool }{ // TODO: Add test cases. { name: "公告新增", args: args{ chatGroupId: 3, content: "一起来玩啊", appid: "10000", }, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { b := ChatGroupService{} if got := b.GroupNoticeAdd(tt.args.chatGroupId, tt.args.content, tt.args.appid); got != tt.want { t.Errorf("GroupNoticeAdd() = %v, want %v", got, tt.want) } }) } } func TestChatGroupService_GroupNoticeGet(t *testing.T) { type args struct { chatGroupId int64 appid string } tests := []struct { name string args args want map[string]interface{} }{ // TODO: Add test cases. { name: "公告获取", args: args{ chatGroupId: 3, appid: "10000", }, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { b := ChatGroupService{} if got := b.GroupNoticeGet(tt.args.chatGroupId, tt.args.appid); !reflect.DeepEqual(got, tt.want) { t.Errorf("GroupNoticeGet() = %v, want %v", got, tt.want) } }) } } func TestChatGroupService_GroupNoticeUpdate(t *testing.T) { type args struct { groupNoticeId int64 content string appid string } tests := []struct { name string args args want bool }{ // TODO: Add test cases. { name: "公告修改", args: args{ groupNoticeId: 1, content: "一起来吗qqqqq", appid: "10000", }, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { b := ChatGroupService{} if got := b.GroupNoticeUpdate(tt.args.groupNoticeId, tt.args.content, tt.args.appid); got != tt.want { t.Errorf("GroupNoticeUpdate() = %v, want %v", got, tt.want) } }) } } func TestEntPerson(t *testing.T) { type args struct { entId int64 isAll bool } tests := []struct { name string args args want map[string]string want1 map[string]string }{ // TODO: Add test cases. } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { got, got1 := EntPerson(tt.args.entId, tt.args.isAll) if !reflect.DeepEqual(got, tt.want) { t.Errorf("EntPerson() got = %v, want %v", got, tt.want) } if !reflect.DeepEqual(got1, tt.want1) { t.Errorf("EntPerson() got1 = %v, want %v", got1, tt.want1) } }) } }