package test

import (
	"applet/app/db"
	"applet/app/lib/taoke"
	"applet/app/svc"
	"fmt"
	"testing"
)

func TestBrandList(t *testing.T) {
	tkBrandStruct, err := taoke.BrandList("1", "20")
	if err != nil {
		t.Error(err)
	}
	for _, brandStruct := range *tkBrandStruct {
		fmt.Println(brandStruct)
	}

}

func TestSuperCategory(t *testing.T) {
	category, err := taoke.SuperCategory()
	if err != nil {
		t.Error(err)
	}
	for _, brandStruct := range *category {
		fmt.Println(brandStruct)
	}
}

func TestAddBrandDB(t *testing.T) {
	engine := db.DBs["123456"]
	svc.AddBrandDB(engine)
}