123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- package logic
- import (
- "context"
- "github.com/zeromicro/go-zero/core/logx"
- "jyBXSubscribe/rpc/internal/svc"
- "jyBXSubscribe/rpc/type/bxsubscribe"
- "reflect"
- "testing"
- )
- func TestGetSubSomeInfoLogic_GetSubSomeInfo(t *testing.T) {
- type fields struct {
- ctx context.Context
- svcCtx *svc.ServiceContext
- Logger logx.Logger
- }
- type args struct {
- in *bxsubscribe.SomeInfoReq
- }
- tests := []struct {
- name string
- fields fields
- args args
- want *bxsubscribe.SomeInfoResp
- wantErr bool
- }{
- // TODO: Add test cases.
- {
- name: "用户订阅信息查询",
- args: args{in: &bxsubscribe.SomeInfoReq{
- AppId: "10000",
- UserId: "5e8eb60ae138234b4f91aacf",
- UserType: "mType",
- NewUserId: 11111,
- },
- },
- },
- }
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- l := &GetSubSomeInfoLogic{
- ctx: tt.fields.ctx,
- svcCtx: tt.fields.svcCtx,
- Logger: tt.fields.Logger,
- }
- got, err := l.GetSubSomeInfo(tt.args.in)
- if (err != nil) != tt.wantErr {
- t.Errorf("GetSubSomeInfo() error = %v, wantErr %v", err, tt.wantErr)
- return
- }
- if !reflect.DeepEqual(got, tt.want) {
- t.Errorf("GetSubSomeInfo() got = %v, want %v", got, tt.want)
- }
- })
- }
- }
- func TestNewGetSubListLogic(t *testing.T) {
- type args struct {
- ctx context.Context
- svcCtx *svc.ServiceContext
- }
- tests := []struct {
- name string
- args args
- want *GetSubListLogic
- }{
- // TODO: Add test cases.
- }
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- if got := NewGetSubListLogic(tt.args.ctx, tt.args.svcCtx); !reflect.DeepEqual(got, tt.want) {
- t.Errorf("NewGetSubListLogic() = %v, want %v", got, tt.want)
- }
- })
- }
- }
- func TestNewGetSubSomeInfoLogic(t *testing.T) {
- type args struct {
- ctx context.Context
- svcCtx *svc.ServiceContext
- }
- tests := []struct {
- name string
- args args
- want *GetSubSomeInfoLogic
- }{
- // TODO: Add test cases.
- }
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- if got := NewGetSubSomeInfoLogic(tt.args.ctx, tt.args.svcCtx); !reflect.DeepEqual(got, tt.want) {
- t.Errorf("NewGetSubSomeInfoLogic() = %v, want %v", got, tt.want)
- }
- })
- }
- }
|