Class AbstractRenderingTest

    • Constructor Detail

      • AbstractRenderingTest

        public AbstractRenderingTest​(TestData testData,
                                     String metadataSyntaxId,
                                     org.xwiki.component.manager.ComponentManager componentManager)
        Parameters:
        testData - the data for a single test
        metadataSyntaxId - the Syntax id of the syntax used as Metadata in the generated XDOM for parsers
        componentManager - see getComponentManager()
    • Method Detail

      • execute

        public void execute()
                     throws Exception
        Executes a single test.
        Throws:
        Exception - if an error happened during the test
      • getTestData

        protected TestData getTestData()
      • executeInputTest

        protected void executeInputTest()
                                 throws Exception
        Executes the test as an input test. This means:
        • Parse the Syntax input
        • Render the generated XDOM using the CTS Renderer
        • Compare result with the CTS Output
        Throws:
        Exception - if an error happens, for example if a Parser or Renderer cannot be found
      • executeOutputTest

        protected void executeOutputTest()
                                  throws Exception
        Executes the test as an output test. This means:
        • Parse the CTS input
        • Render the generated XDOM using the Syntax Renderer
        • Compare result with the Syntax Output
        Throws:
        Exception - if an error happens, for example if a Parser or Renderer cannot be found
      • throwAssertionException

        protected abstract void throwAssertionException​(String message,
                                                        String expected,
                                                        String result)