47 lines
1.2 KiB
Go
47 lines
1.2 KiB
Go
package ebai
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"git.rosy.net.cn/jx-callback/business/partner"
|
|
|
|
"git.rosy.net.cn/baseapi/utils"
|
|
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
|
)
|
|
|
|
func TestGetStoreSkusFullInfo(t *testing.T) {
|
|
skuNameList, err := CurPurchaseHandler.GetStoreSkusFullInfo(jxcontext.AdminCtx, nil, testShopID, testShopBaiduID, []*partner.StoreSkuInfo{
|
|
&partner.StoreSkuInfo{
|
|
SkuID: 4256,
|
|
},
|
|
})
|
|
if err != nil {
|
|
t.Fatal(err.Error())
|
|
}
|
|
t.Log(utils.Format4Output(skuNameList, false))
|
|
t.Log(len(skuNameList))
|
|
}
|
|
|
|
func TestGetStoreSkusBareInfo(t *testing.T) {
|
|
storeSkuList, err := CurPurchaseHandler.GetStoreSkusBareInfo(jxcontext.AdminCtx, "", nil, testShopID, testShopBaiduID, nil)
|
|
if err != nil {
|
|
t.Fatal(err.Error())
|
|
}
|
|
t.Log(utils.Format4Output(storeSkuList, false))
|
|
t.Log(len(storeSkuList))
|
|
}
|
|
|
|
func TestDeleteStoreAllSkus(t *testing.T) {
|
|
err := CurPurchaseHandler.DeleteStoreAllSkus(jxcontext.AdminCtx, nil, testShopID, testShopBaiduID, true)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
}
|
|
|
|
func TestDeleteStoreAllCategories(t *testing.T) {
|
|
err := CurPurchaseHandler.DeleteStoreAllCategories(jxcontext.AdminCtx, nil, testShopID, testShopBaiduID, true)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
}
|