def test_10(self):
     # Arrange
     data = [
         'class LevelEditor{\\n', '  allMyBlocks\\n', '  getBlock()\\n',
         '}\\n', '@enduml'
     ]
     validate = ValidateData(data)
     expected_result = False
     # Act
     actual_result = validate.is_validate_date()
     # Assert
     self.assertEqual(actual_result, expected_result, 'Expected to be True')
Exemple #2
0
def start():
    print('start')
    file_handler = FileHandler()
    file_content = file_handler.load_from_file()
    validate = ValidateData(file_content)
    if validate.is_validate_date():
        interpreter = UmlInterpreter()
        uml_list = interpreter.uml_decoder(file_content)

        # builder = PythonBuilder()
        builder = JavaScriptBuilder()
        director = CodeDirector(builder)
        director.construct(uml_list)
        all_my_classes = builder.get_classes()

        file_handler.get_folder_dir()
        for item in all_my_classes:
            # file_name = root.directory + '/' + item['file_name']
            file_handler.write_to_file(item['file_name'], item['file_content'])
            file_handler.write_to_pickle(item['file_name'],
                                         item['file_content'])
    print('end')