Files
baseapi/platformapi/mtwmapi/order_test.go
gazebo 27f22b8e9a - up
2019-03-28 08:54:46 +08:00

54 lines
1.1 KiB
Go

package mtwmapi
import (
"testing"
)
func TestOrderViewStatus(t *testing.T) {
result, err := api.OrderViewStatus(33762863658107006)
if err != nil {
t.Fatal(err)
}
t.Log(result)
}
func TestOrderGetOrderDetail(t *testing.T) {
result, err := api.OrderGetOrderDetail(33762863658107006, false)
if err != nil {
t.Fatal(err)
}
if len(result) == 0 {
t.Fatal("result should have value")
}
// t.Log(utils.Format4Output(result, false))
}
func TestOrderLogisticsStatus(t *testing.T) {
result, err := api.OrderLogisticsStatus(33762863658107006)
if err != nil {
t.Fatal(err)
}
if len(result) == 0 {
t.Fatal("result should have value")
}
// t.Log(utils.Format4Output(result, false))
}
func TestOrderBatchPullPhoneNumber(t *testing.T) {
result, err := api.OrderBatchPullPhoneNumber(testPoiCode, 0, 10)
if err != nil {
t.Fatal(err)
}
if len(result) == 0 {
t.Fatal("result should have value")
}
// t.Log(utils.Format4Output(result, false))
}
func TestOrderConfirm(t *testing.T) {
err := api.OrderConfirm(24617230733961993)
if err != nil {
t.Fatal(err)
}
}