# Path: l2tscaffolder/definitions/interface.py
# class ScaffolderDefinition:
#   NAME = definitions.DEFINITION_UNDEFINED
#   def ValidatePath(self, root_path: str) -> bool:
# 
# Path: l2tscaffolder/definitions/manager.py
# class DefinitionManager:
#   def DeregisterDefinition(
#       cls, definition_class: Type[interface.ScaffolderDefinition]):
#   def GetDefinitionByName(
#       cls, name: str) -> Type[interface.ScaffolderDefinition]:
#   def GetDefinitionNames(cls) -> Iterator[str]:
#   def GetDefinitionObjects(cls) -> Iterator[interface.ScaffolderDefinition]:
#   def RegisterDefinition(
#       cls, definition_class: Type[interface.ScaffolderDefinition]):
# 
# Path: l2tscaffolder/lib/engine.py
# class ScaffolderEngine:
#   def __init__(self):
#   def _RaiseIfNotReady(self):
#   def GenerateFiles(self) -> Iterator[str]:
#   def SetModuleName(self, module_name: str):
#   def SetScaffolder(self, scaffolder: scaffolder_interface.Scaffolder):
#   def SetProjectRootPath(self, root_path: str):
#   def StoreScaffolderAttribute(
#       self, name: str, value: object, value_type: Type):
# 
# Path: l2tscaffolder/lib/errors.py
# class Error(Exception):
# class EngineNotConfigured(Error):
# class FileHandlingError(Error):
# class NoValidDefinition(Error):
# class ScaffolderNotConfigured(Error):
# class UnableToConfigure(Error):
# class WrongCliInput(Error):
# 
# Path: l2tscaffolder/scaffolders/interface.py
# class BaseQuestion:
# class DictQuestion(BaseQuestion):
# class IntQuestion(BaseQuestion):
# class ListQuestion(BaseQuestion):
# class StringQuestion(BaseQuestion):
# class Scaffolder:
#   TYPE = None
#   TYPE = dict
#   TYPE = int
#   TYPE = list
#   TYPE = str
#   NAME = 'base_parser'
#   DESCRIPTION = ''
#   PROJECT = definitions.DEFINITION_PLASO
#   QUESTIONS = []
#   def __init__(self, attribute: str, prompt: str):
#   def _ValidateType(self, answer: object):
#   def ValidateAnswer(self, answer: object):
#   def __init__(self, attribute, prompt, key_prompt, value_prompt):
#   def __init__(self):
#   def GetInitFileChanges(self) -> Iterator[Tuple[str, str]]:
#   def GetJinjaContext(self) -> Dict[str, object]:
#   def GetQuestions(self) -> List[BaseQuestion]:
#   def GenerateFiles(self) -> Iterator[Tuple[str, str]]:
#   def GetFilesToCopy(self) -> Iterator[Tuple[str, str]]:
#   def RaiseIfNotReady(self):
#   def SetOutputName(self, output_name: str):
#   def SetAttribute(self, name: str, value: object, value_type: type):


import os
import unittest
from l2tscaffolder.definitions import interface as definition_interface
from l2tscaffolder.definitions import manager as definition_manager
from l2tscaffolder.lib import engine
from l2tscaffolder.lib import errors
from l2tscaffolder.scaffolders import interface as scaffolder_interface
    test_engine = engine.ScaffolderEngine()
    test_scaffolder = AwesomeScaffolder()
    test_engine.SetScaffolder(test_scaffolder)

    test_string1 = 'Test String'
    test_string2 = 'Part of the scaffolder'
    test_string3 = 'I\'m stored in the scaffolder!'

    test_engine.StoreScaffolderAttribute('test1', test_string1, str)
    with self.assertRaises(errors.ScaffolderNotConfigured):
      test_scaffolder.RaiseIfNotReady()

    test_engine.StoreScaffolderAttribute('test2', test_string2, str)
    with self.assertRaises(errors.ScaffolderNotConfigured):
      test_scaffolder.RaiseIfNotReady()

    test_engine.StoreScaffolderAttribute('test3', test_string3, str)
    self.assertIsNone(test_scaffolder.RaiseIfNotReady())

    scaffolder_attributes = test_scaffolder.GetJinjaContext()
    test1_attr = scaffolder_attributes.get('test1', '')
    test2_attr = scaffolder_attributes.get('test2', '')
    test3_attr = scaffolder_attributes.get('test3', '')

    self.assertEqual(test1_attr, test_string1)
    self.assertEqual(test2_attr, test_string2)
    self.assertEqual(test3_attr, test_string3)

  def testEngineNotReady(self):
    """Tests if the engine is fully configured."""

# Path: l2tscaffolder/definitions/interface.py
# class ScaffolderDefinition:
#   NAME = definitions.DEFINITION_UNDEFINED
#   def ValidatePath(self, root_path: str) -> bool:
# 
# Path: l2tscaffolder/definitions/manager.py
# class DefinitionManager:
#   def DeregisterDefinition(
#       cls, definition_class: Type[interface.ScaffolderDefinition]):
#   def GetDefinitionByName(
#       cls, name: str) -> Type[interface.ScaffolderDefinition]:
#   def GetDefinitionNames(cls) -> Iterator[str]:
#   def GetDefinitionObjects(cls) -> Iterator[interface.ScaffolderDefinition]:
#   def RegisterDefinition(
#       cls, definition_class: Type[interface.ScaffolderDefinition]):
# 
# Path: l2tscaffolder/lib/engine.py
# class ScaffolderEngine:
#   def __init__(self):
#   def _RaiseIfNotReady(self):
#   def GenerateFiles(self) -> Iterator[str]:
#   def SetModuleName(self, module_name: str):
#   def SetScaffolder(self, scaffolder: scaffolder_interface.Scaffolder):
#   def SetProjectRootPath(self, root_path: str):
#   def StoreScaffolderAttribute(
#       self, name: str, value: object, value_type: Type):
# 
# Path: l2tscaffolder/lib/errors.py
# class Error(Exception):
# class EngineNotConfigured(Error):
# class FileHandlingError(Error):
# class NoValidDefinition(Error):
# class ScaffolderNotConfigured(Error):
# class UnableToConfigure(Error):
# class WrongCliInput(Error):
# 
# Path: l2tscaffolder/scaffolders/interface.py
# class BaseQuestion:
# class DictQuestion(BaseQuestion):
# class IntQuestion(BaseQuestion):
# class ListQuestion(BaseQuestion):
# class StringQuestion(BaseQuestion):
# class Scaffolder:
#   TYPE = None
#   TYPE = dict
#   TYPE = int
#   TYPE = list
#   TYPE = str
#   NAME = 'base_parser'
#   DESCRIPTION = ''
#   PROJECT = definitions.DEFINITION_PLASO
#   QUESTIONS = []
#   def __init__(self, attribute: str, prompt: str):
#   def _ValidateType(self, answer: object):
#   def ValidateAnswer(self, answer: object):
#   def __init__(self, attribute, prompt, key_prompt, value_prompt):
#   def __init__(self):
#   def GetInitFileChanges(self) -> Iterator[Tuple[str, str]]:
#   def GetJinjaContext(self) -> Dict[str, object]:
#   def GetQuestions(self) -> List[BaseQuestion]:
#   def GenerateFiles(self) -> Iterator[Tuple[str, str]]:
#   def GetFilesToCopy(self) -> Iterator[Tuple[str, str]]:
#   def RaiseIfNotReady(self):
#   def SetOutputName(self, output_name: str):
#   def SetAttribute(self, name: str, value: object, value_type: type):


# Path: tests/lib/engine.py
import os
import unittest
from l2tscaffolder.definitions import interface as definition_interface
from l2tscaffolder.definitions import manager as definition_manager
from l2tscaffolder.lib import engine
from l2tscaffolder.lib import errors
from l2tscaffolder.scaffolders import interface as scaffolder_interface

    test_engine = engine.ScaffolderEngine()
    test_scaffolder = AwesomeScaffolder()
    test_engine.SetScaffolder(test_scaffolder)

    test_string1 = 'Test String'
    test_string2 = 'Part of the scaffolder'
    test_string3 = 'I\'m stored in the scaffolder!'

    test_engine.StoreScaffolderAttribute('test1', test_string1, str)
    with self.assertRaises(errors.ScaffolderNotConfigured):
      test_scaffolder.RaiseIfNotReady()

    test_engine.StoreScaffolderAttribute('test2', test_string2, str)
    with self.assertRaises(errors.ScaffolderNotConfigured):
      test_scaffolder.RaiseIfNotReady()

    test_engine.StoreScaffolderAttribute('test3', test_string3, str)
    self.assertIsNone(test_scaffolder.RaiseIfNotReady())

    scaffolder_attributes = test_scaffolder.GetJinjaContext()
    test1_attr = scaffolder_attributes.get('test1', '')
    test2_attr = scaffolder_attributes.get('test2', '')
    test3_attr = scaffolder_attributes.get('test3', '')

    self.assertEqual(test1_attr, test_string1)
    self.assertEqual(test2_attr, test_string2)
    self.assertEqual(test3_attr, test_string3)

  def testEngineNotReady(self):
    """Tests if the engine is fully configured."""

    test_engine = engine.ScaffolderEngine()