42 lines
1.1 KiB
Go
42 lines
1.1 KiB
Go
package mtwm
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"git.rosy.net.cn/baseapi/utils"
|
|
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
|
// _ "git.rosy.net.cn/jx-callback/business/jxcallback/orderman"
|
|
)
|
|
|
|
func TestGetStoreSkusFullInfo(t *testing.T) {
|
|
skuNameList, err := new(PurchaseHandler).GetStoreSkusFullInfo(jxcontext.AdminCtx, nil, 2, "2523687", nil)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
t.Log(utils.Format4Output(skuNameList, false))
|
|
t.Log(len(skuNameList))
|
|
}
|
|
|
|
func TestGetStoreSkusBareInfo(t *testing.T) {
|
|
storeSkuList, err := curPurchaseHandler.GetStoreSkusBareInfo(jxcontext.AdminCtx, nil, 2, "2523687", 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, 2, "2523687", true)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
}
|
|
|
|
func TestDeleteStoreAllCategories(t *testing.T) {
|
|
err := curPurchaseHandler.DeleteStoreAllCategories(jxcontext.AdminCtx, nil, 2, "2523687", true)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
}
|