示例#1
0
文件: dbtest.go 项目: Cristofori/kmud
func Test_Item(t *testing.T) {
	name := "test_item"
	template := database.NewTemplate(name)
	item := database.NewItem(template.GetId())

	testutils.Assert(item.GetName() == name, t, "Item didn't get created with correct name", name, item.GetName())
}
示例#2
0
文件: model.go 项目: Cristofori/kmud
func CreateItem(templateId types.Id) types.Item {
	return db.NewItem(templateId)
}