How to use the decorator.decorateGHPagesContent function in decorator

To help you get started, we’ve selected a few decorator examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dstar55 / 100-words-design-patterns-java / test_decorator.py View on Github external
def test_decorateGHPagesContent(self):
        
        # lets decorate prepare for the gh-pages content
        dictsArray = decorator.decorateGHPagesContent(self.dictsArray)
                    
        # number of elements in dictsArray should remain the same        
        self.assertEqual(23, len(dictsArray))
        
        # first member of the array is singleton dictionary
        singletonContent = dictsArray[0] 
        
        # check Singleton image section
        self.assertEqual(True, ("/assets/img/image/singleton.jpg" in singletonContent.get(constants.DICT_KEY_PATTERN_IMAGE)))
        self.assertEqual(True, ("http://www.design-patterns-stories.com/assets/img/image/singleton.jpg" in singletonContent.get(constants.DICT_KEY_PATTERN_IMAGE)))
        
        self.assertEqual("http://www.design-patterns-stories.com/assets/img/uml/singleton.png", singletonContent.get(constants.DICT_KEY_PATTERN_UML_FILE_NAME))

        #template method
        templateMethodContent = dictsArray[21]
github dstar55 / 100-words-design-patterns-java / design-patterns-story.py View on Github external
def main_slides():
    content.createSlidesContent(decorator.decorateGHPagesContent(parser.parseReadme(constants.LOCAL_MASTER_REPOSITORY_PATH + constants.SLASH + constants.README_FILE_NAME)))
github dstar55 / 100-words-design-patterns-java / design-patterns-story.py View on Github external
def main_generate():
    content.createGHPagesContent(decorator.decorateGHPagesContent(parser.parseReadme(constants.LOCAL_MASTER_REPOSITORY_PATH + constants.SLASH + constants.README_FILE_NAME)))
github dstar55 / 100-words-design-patterns-java / design-patterns-story.py View on Github external
def main_fractus():
    content.createFractusTutorialsContent(decorator.decorateGHPagesContent(parser.parseReadme(constants.LOCAL_MASTER_REPOSITORY_PATH + constants.SLASH + constants.README_FILE_NAME)))