55 lines
1.2 KiB
Go
55 lines
1.2 KiB
Go
package pddapi
|
|
|
|
import (
|
|
"git.rosy.net.cn/baseapi/utils"
|
|
"testing"
|
|
)
|
|
|
|
func TestGoodsOPidGenerate(t *testing.T) {
|
|
result, err := api.GoodsOPidGenerate("冲天猴儿5")
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
t.Log(utils.Format4Output(result, false))
|
|
}
|
|
|
|
func TestActivityOperationList(t *testing.T) {
|
|
result, err := api.ActivityOperationList()
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
t.Log(utils.Format4Output(result, false))
|
|
}
|
|
|
|
func TestRpPromURLGenerate(t *testing.T) {
|
|
result, err := api.RpPromURLGenerate("14501219_204919171")
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
t.Log(utils.Format4Output(result, false))
|
|
}
|
|
|
|
func TestResourceURLGen(t *testing.T) {
|
|
result, err := api.ResourceURLGen("14501219_204919171", resouceTypeBYBT)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
t.Log(utils.Format4Output(result, false))
|
|
}
|
|
|
|
func TestGoodsPromotionURLGen(t *testing.T) {
|
|
result, err := api.GoodsPromotionURLGen("14501219_204919171", "Y9n2oxrce6hKWDjRwfDZDbjMGeyz1JsC_J7fydjteU", false)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
t.Log(utils.Format4Output(result, false))
|
|
}
|
|
|
|
func TestMemberAuthorityQuery(t *testing.T) {
|
|
result, err := api.MemberAuthorityQuery("14501219_204919171")
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
t.Log(utils.Format4Output(result, false))
|
|
}
|