- store page api for ebai.
This commit is contained in:
42
platformapi/ebaiapi/store_page_test.go
Normal file
42
platformapi/ebaiapi/store_page_test.go
Normal file
@@ -0,0 +1,42 @@
|
||||
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))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user