54 lines
1.1 KiB
Go
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)
|
|
}
|
|
}
|