# Path: worldbuild/crafting/craft.py
# def get_fullname(fname):
# def main():
#     def __init__(self, objectClass, fname):
#     def __str__(self):
#     def str_object_list(self, show_number='Y'):
#     def fill_from_csv(self, fname):
#     def rebuild_list(self):
#     def __init__(self, recipe_id,recipe_name,base_time_to_build,base_cost_to_build):
#     def __str__(self):
#     def __init__(self,category,name,type,buy_price,sell_price,desc):
#     def __str__(self):
#     def __init__(self,name,quant):
#     def __str__(self):
#     def __init__(self, recipe_id,item_id,quantity,crafting_method_id):
#     def __str__(self):
#     def __init__(self,crafting_method_id,crafting_action,base_time,base_cost,tools_required,consumables_required,skill_area):
#     def __str__(self):
# class DataSet(object):
# class Recipe(object):
# class Item(object):
# class ItemSpawnRate(object):
# class RecipeIngredient(object):
# class CraftingMethod(object):


import os
import sys
import unittest
from worldbuild.crafting import craft as mod_craft
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# test_crafting.py

root_folder = os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + os.sep + ".." )
pth = root_folder #+ os.sep + 'worldbuild'
sys.path.append(pth)




class TestTemplate(unittest.TestCase):
    def setUp(self):
        unittest.TestCase.setUp(self)


    def tearDown(self):
        unittest.TestCase.tearDown(self)


    def test_01_recipe(self):
        res = mod_craft.Recipe('1', 'new recipe','20','mix')
        #print(res)
        self.assertEqual(str(res),'new recipe')

    def test_02_dataset_recipe(self):

# Path: worldbuild/crafting/craft.py
# def get_fullname(fname):
# def main():
#     def __init__(self, objectClass, fname):
#     def __str__(self):
#     def str_object_list(self, show_number='Y'):
#     def fill_from_csv(self, fname):
#     def rebuild_list(self):
#     def __init__(self, recipe_id,recipe_name,base_time_to_build,base_cost_to_build):
#     def __str__(self):
#     def __init__(self,category,name,type,buy_price,sell_price,desc):
#     def __str__(self):
#     def __init__(self,name,quant):
#     def __str__(self):
#     def __init__(self, recipe_id,item_id,quantity,crafting_method_id):
#     def __str__(self):
#     def __init__(self,crafting_method_id,crafting_action,base_time,base_cost,tools_required,consumables_required,skill_area):
#     def __str__(self):
# class DataSet(object):
# class Recipe(object):
# class Item(object):
# class ItemSpawnRate(object):
# class RecipeIngredient(object):
# class CraftingMethod(object):


# Path: tests/test_crafting.py
import os
import sys
import unittest
from worldbuild.crafting import craft as mod_craft

#!/usr/bin/python3
# -*- coding: utf-8 -*-
# test_crafting.py

root_folder = os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + os.sep + ".." )
pth = root_folder #+ os.sep + 'worldbuild'
sys.path.append(pth)




class TestTemplate(unittest.TestCase):
    def setUp(self):
        unittest.TestCase.setUp(self)


    def tearDown(self):
        unittest.TestCase.tearDown(self)


    def test_01_recipe(self):
        res = mod_craft.Recipe('1', 'new recipe','20','mix')
        #print(res)
        self.assertEqual(str(res),'new recipe')

    def test_02_dataset_recipe(self):

        recipes = mod_craft.DataSet(mod_craft.Recipe, mod_craft.get_fullname('recipes.csv'))