package third import ( "testing" ) func TestGetUserInfoPlus(t *testing.T) { type args struct { key string } tests := []struct { name string args args want bool wantErr bool }{ // TODO: Add test cases. { name: "ok", args: args{""}, want: true, wantErr: false, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { got, err := GetUserInfoPlus() if (err != nil) != tt.wantErr { t.Errorf("GetParseStatus() error = %v, wantErr %v", err, tt.wantErr) return } if got != tt.want { t.Errorf("GetParseStatus() got = %v, want %v", got, tt.want) } }) } } func Test_GetRecords(t *testing.T) { type args struct { key string } tests := []struct { name string args args want bool wantErr bool }{ // TODO: Add test cases. { name: "ok", args: args{"tzlbndf9pi7ebzky"}, want: true, wantErr: false, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { got, err := GetRecords(tt.args.key) if (err != nil) != tt.wantErr { t.Errorf("getRecords() error = %v, wantErr %v", err, tt.wantErr) return } if got == nil { t.Errorf("getRecords() got = %v, want %v", got, tt.want) } }) } } func TestPurchasePaperPlusProxy(t *testing.T) { type args struct { card string source string } tests := []struct { name string args args want *PurchasePaperPlusProxyRespondParam wantErr bool }{ // TODO: Add test cases. { name: "ok", args: args{"tzlbndf9pi7ebzky", "https://blog.csdn.net/mopmgerg54mo/article/details/145314910"}, wantErr: false, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { got, err := PurchasePaperPlusProxy(tt.args.card, tt.args.source) if (err != nil) != tt.wantErr { t.Errorf("PurchasePaperPlusProxy() error = %v, wantErr %v", err, tt.wantErr) return } if got.Code != 200 { t.Errorf("PurchasePaperPlusProxy() got = %v, want %v", got, tt.want) } }) } } func TestGetTaskPrice(t *testing.T) { type args struct { source string } tests := []struct { name string args args want *GeTaskPriceRespondParam wantErr bool }{ // TODO: Add test cases. { name: "ok", args: args{"https://blog.csdn.net/mopmgerg54mo/article/details/145314910"}, wantErr: false, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { got, err := GetTaskPrice(tt.args.source) if (err != nil) != tt.wantErr { t.Errorf("GetTaskPrice() error = %v, wantErr %v", err, tt.wantErr) return } if got.Code != 200 { t.Errorf("GetTaskPrice() got = %v, want %v", got, tt.want) } }) } } func TestGetCountProxy(t *testing.T) { type args struct { Key string } tests := []struct { name string args args want *GetCountProxyRespondParam wantErr bool }{ // TODO: Add test cases. { name: "ok", args: args{"tzlbndf9pi7ebzky"}, wantErr: false, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { got, err := GetCountProxy(tt.args.Key) if (err != nil) != tt.wantErr { t.Errorf("GetCountProxy() error = %v, wantErr %v", err, tt.wantErr) return } if got.Code != 200 { t.Errorf("GetCountProxy() got = %v, want %v", got, tt.want) } }) } }