物联卡
This commit is contained in:
@@ -2,6 +2,7 @@ package tibiotapi
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/baseapi"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"go.uber.org/zap"
|
||||
"testing"
|
||||
)
|
||||
@@ -20,9 +21,41 @@ func init() {
|
||||
}
|
||||
|
||||
func TestGetCardInfo(t *testing.T) {
|
||||
err := api.GetCardInfo("")
|
||||
result, err := api.GetCardInfo("89860426102180138547")
|
||||
if err != nil {
|
||||
t.Fatalf("PrintMsg return error:%v", err)
|
||||
}
|
||||
//baseapi.SugarLogger.Debug(result)
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
func TestBatchQueryCardInfo(t *testing.T) {
|
||||
result, err := api.BatchQueryCardInfo(1)
|
||||
if err != nil {
|
||||
t.Fatalf("PrintMsg return error:%v", err)
|
||||
}
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
func TestIotData(t *testing.T) {
|
||||
result, err := api.IotData("89860490102070456598", "2021-07-19")
|
||||
if err != nil {
|
||||
t.Fatalf("PrintMsg return error:%v", err)
|
||||
}
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
func TestCardActivation(t *testing.T) {
|
||||
result, err := api.CardActivation("1")
|
||||
if err != nil {
|
||||
t.Fatalf("PrintMsg return error:%v", err)
|
||||
}
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
func TestSubmit(t *testing.T) {
|
||||
result, err := api.Submit("1", 0)
|
||||
if err != nil {
|
||||
t.Fatalf("PrintMsg return error:%v", err)
|
||||
}
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user