- 对于饿百与美团外卖订单,设置其PickDeadline
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/globals/refutil"
|
||||
)
|
||||
|
||||
func TestObjFieldByName(t *testing.T) {
|
||||
@@ -14,27 +15,27 @@ func TestObjFieldByName(t *testing.T) {
|
||||
ID: 1,
|
||||
Name: "hello",
|
||||
}
|
||||
if GetObjFieldByName(kk, "ID").(int8) != 1 {
|
||||
if refutil.GetObjFieldByName(kk, "ID").(int8) != 1 {
|
||||
t.Fatal("value is not ok")
|
||||
}
|
||||
if GetObjFieldByName(kk, "Name").(string) != "hello" {
|
||||
if refutil.GetObjFieldByName(kk, "Name").(string) != "hello" {
|
||||
t.Fatal("value is not ok")
|
||||
}
|
||||
|
||||
pKK := &kk
|
||||
if GetObjFieldByName(pKK, "ID").(int8) != 1 {
|
||||
if refutil.GetObjFieldByName(pKK, "ID").(int8) != 1 {
|
||||
t.Fatal("value is not ok")
|
||||
}
|
||||
if GetObjFieldByName(pKK, "Name").(string) != "hello" {
|
||||
if refutil.GetObjFieldByName(pKK, "Name").(string) != "hello" {
|
||||
t.Fatal("value is not ok")
|
||||
}
|
||||
|
||||
SetObjFieldByName(pKK, "ID", int8(100))
|
||||
SetObjFieldByName(pKK, "Name", "world")
|
||||
if GetObjFieldByName(pKK, "ID").(int8) != 100 {
|
||||
refutil.SetObjFieldByName(pKK, "ID", int8(100))
|
||||
refutil.SetObjFieldByName(pKK, "Name", "world")
|
||||
if refutil.GetObjFieldByName(pKK, "ID").(int8) != 100 {
|
||||
t.Fatal("value is not ok")
|
||||
}
|
||||
if GetObjFieldByName(pKK, "Name").(string) != "world" {
|
||||
if refutil.GetObjFieldByName(pKK, "Name").(string) != "world" {
|
||||
t.Fatal("value is not ok")
|
||||
}
|
||||
t.Log(utils.Format4Output(pKK, false))
|
||||
|
||||
Reference in New Issue
Block a user