package elmapi

import (
	"testing"

	"git.rosy.net.cn/baseapi/utils"
)

func TestGetUser(t *testing.T) {
	result, err := elmapi.GetUser()
	if err != nil {
		t.Fatalf("GetUser failed with error:%v", err)
	}
	sugarLogger.Debug(result)
}

func TestGetAccAndStores(t *testing.T) {
	accs, stores, err := elmapi.GetAccAndStores()
	if err != nil || len(stores) == 0 || len(accs) == 0 {
		t.Fatalf("GetAccAndStores failed with error:%v", err)
	}
	sugarLogger.Debug(utils.Format4Output(stores, false))
}

func TestGetShop(t *testing.T) {
	result, err := elmapi.GetShop(157451618)
	if err != nil {
		t.Fatalf("GetShop failed with error:%v", err)
	}
	sugarLogger.Debug(result)
}
