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("2019-02-14 13:00:00", "2019-02-15 15: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)) } }