Details

    • Type: Bug Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 1.0
    • Fix Version/s: None
    • Component/s: general
    • Labels:
      None
    • Environment:
      Operating System: Linux
      Platform: PC
    • External issue ID:
      51928

      Description

      This is the eagerly anticipated upgrade of FOPs JUnit tests to JUnit4. There are a few notable differences:
      1) Tests can now be parameterized (I'll discuss this later).
      2) The test outputs have less meaningful names when parameterized, the layout engine tests used to be instantiated with the names of set as the name of the FO used in the test. Because these have been changed to be parameterized tests, the output is less useful. I haven't found a suitable way of changing the name of the test for a parameterized test short of overriding the org.junit.runners.Parameterized.

      I've tried to touch as little as possible with the layout engine tests, in terms of their reliance on the system properties being injected in. I wish to change that in a future commit, but I think it's a logically separate issue and I will create a separate patch for that.

      The layout engine tests do need a little TLC, there seems to be a fair amount of code duplication in that area. I'll address these at the same time as the patch above.

      1. junit4.patch
        193 kB
        Mehdi Houshmand
      2. junit4.patch
        186 kB
        Mehdi Houshmand

        Activity

        Hide
        Vincent Hennebert added a comment -

        Patch applied in rev. 1178747:
        http://svn.apache.org/viewvc?rev=1178747&view=rev

        I made some minor modifications relating to cosmetics and a few elements lost in the conversion.

        Some things could be improved in the FO Tree, Layout and Area Tree tests but since you mentioned that you will be working on them in a separate patch, I committed them as they are.

        Thanks!
        Vincent

        Show
        Vincent Hennebert added a comment - Patch applied in rev. 1178747: http://svn.apache.org/viewvc?rev=1178747&view=rev I made some minor modifications relating to cosmetics and a few elements lost in the conversion. Some things could be improved in the FO Tree, Layout and Area Tree tests but since you mentioned that you will be working on them in a separate patch, I committed them as they are. Thanks! Vincent
        Hide
        Mehdi Houshmand added a comment -

        Attachment junit4.patch has been added with description: patch with LayoutEngineTestUtils

        Show
        Mehdi Houshmand added a comment - Attachment junit4.patch has been added with description: patch with LayoutEngineTestUtils
        Hide
        Vincent Hennebert added a comment -

        Hi Mehdi,

        The patch is missing a new LayoutEngineTestUtils class. Can you please add it to this bug report?

        In the future, you can include new classes directly to patches by 'svn add'ing them before creating the patch.

        Thanks,
        Vincent

        Show
        Vincent Hennebert added a comment - Hi Mehdi, The patch is missing a new LayoutEngineTestUtils class. Can you please add it to this bug report? In the future, you can include new classes directly to patches by 'svn add'ing them before creating the patch. Thanks, Vincent
        Hide
        Mehdi Houshmand added a comment -

        Attachment junit4.patch has been added with description: Update unit tests to JUnit4

        Show
        Mehdi Houshmand added a comment - Attachment junit4.patch has been added with description: Update unit tests to JUnit4

          People

          • Assignee:
            fop-dev
            Reporter:
            Mehdi Houshmand
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development