package jdshop import ( "git.rosy.net.cn/baseapi/platformapi/jdshopapi" "git.rosy.net.cn/jx-callback/business/jxutils/jxcontext" "git.rosy.net.cn/jx-callback/business/partner" "git.rosy.net.cn/jx-callback/business/partner/putils" "reflect" "testing" ) func TestPurchaseHandler_GetJdsOrders(t *testing.T) { type fields struct { BasePurchasePlatform partner.BasePurchasePlatform DefSingleStorePlatform putils.DefSingleStorePlatform } type args struct { ctx *jxcontext.Context orderCreatedStart string orderCreatedEnd string current int pageSize int } tests := []struct { name string fields fields args args wantOrderResult *jdshopapi.AllOrdersResult wantErr bool }{ // TODO: Add test cases. } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { p := &PurchaseHandler{ BasePurchasePlatform: tt.fields.BasePurchasePlatform, DefSingleStorePlatform: tt.fields.DefSingleStorePlatform, } gotOrderResult, err := p.GetJdsOrders(tt.args.ctx, tt.args.orderCreatedStart, tt.args.orderCreatedEnd, tt.args.current, tt.args.pageSize) if (err != nil) != tt.wantErr { t.Errorf("GetJdsOrders() error = %v, wantErr %v", err, tt.wantErr) return } if !reflect.DeepEqual(gotOrderResult, tt.wantOrderResult) { t.Errorf("GetJdsOrders() gotOrderResult = %v, want %v", gotOrderResult, tt.wantOrderResult) } }) } }