package ebaiapi import ( "testing" "git.rosy.net.cn/baseapi" "git.rosy.net.cn/baseapi/utils" ) func TestGetRealMobileNumber4Order(t *testing.T) { orderId := "15501080494587" desiredMobile := "18483673654" mobile, err := api.GetRealMobile4Order(orderId) if err != nil { t.Fatal(err) } if mobile != desiredMobile { t.Fatalf("orderId:%s's mobile is wrong, should be %s, but it's:%s", orderId, desiredMobile, mobile) } baseapi.SugarLogger.Debug(mobile) } func TestGetStoreOrderInfo(t *testing.T) { orderId := "15501080494587" // desiredMobile := "18483673654" orderInfo, err := api.GetStoreOrderInfo(orderId) if err != nil { t.Fatal(err) } baseapi.SugarLogger.Debug(utils.Format4Output(orderInfo, false)) } func TestGetStoreOrderInfoList(t *testing.T) { orderInfoList, err := api.GetStoreOrderInfoList("2019-02-14 13:00:00", "2019-02-14 15:30:00", "", -1) if err != nil { t.Fatal(err) } if true { baseapi.SugarLogger.Debug(utils.Format4Output(orderInfoList, false)) baseapi.SugarLogger.Debug(len(orderInfoList)) } } func TestGetEleCommentList(t *testing.T) { commentList, err := api.GetEleCommentList(utils.Str2Time("2019-02-25 00:00:00"), utils.Str2Time("2019-02-25 23:30:00"), "", "", ReplyStatusAll, CommentLevelAll, CommentContentAll) if err != nil { t.Fatal(err) } if true { baseapi.SugarLogger.Debug(utils.Format4Output(commentList, false)) baseapi.SugarLogger.Debug(len(commentList)) } } func TestPageGetSkuList(t *testing.T) { skuList, err := api.PageGetSkuList(2233065941) if err != nil { t.Fatal(err) } if true { baseapi.SugarLogger.Debug(utils.Format4Output(skuList, false)) } } func TestPageGetCustomSkuList(t *testing.T) { skuList, err := api.PageGetCustomSkuList(2267121521, 1552729500062) if err != nil { t.Fatal(err) } if true { baseapi.SugarLogger.Debug(utils.Format4Output(skuList, false)) } } func TestPageGetCustomCatList(t *testing.T) { catList, err := api.PageGetCustomCatList(2233065941) if err != nil { t.Fatal(err) } if true { baseapi.SugarLogger.Debug(utils.Format4Output(catList, false)) } }