JBehave
  1. JBehave
  2. JBEHAVE-804

Improved test in PrintStreamOutputBehaviour

    Details

    • Type: Improvement Improvement
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.6.8
    • Fix Version/s: 3.6.9, 3.7
    • Component/s: Core
    • Labels:
      None
    • Testcase included:
      yes
    • Number of attachments :
      0

      Description

      I tried to improve the tests in PrintStreamOutputBehaviour similar to the changes I did in the Template output to check if xml encoding is done correctly in all cases (it does) and if the file is actually valid xml (it wasn't, not even the expected string was).
      To make this work I added an xmlunit check and changed the order of the created story to match the way a real story is created, in this case the xml is valid.
      This didn't require any change to actual code, only the test code was wrong, so this is a minor issue.

        Activity

        Hide
        Alexander Lehmann added a comment -

        I'm not 100% sure how to commit this to be independent of the previous patch I submitted for the Templatable issue, I will wait until the other patch is merged.

        Show
        Alexander Lehmann added a comment - I'm not 100% sure how to commit this to be independent of the previous patch I submitted for the Templatable issue, I will wait until the other patch is merged.
        Mauro Talevi made changes -
        Field Original Value New Value
        Fix Version/s 3.6.9 [ 18650 ]
        Hide
        Mauro Talevi added a comment -

        Please pull latest with renamed class.

        Show
        Mauro Talevi added a comment - Please pull latest with renamed class.
        Hide
        Alexander Lehmann added a comment -

        https://github.com/alexlehm/jbehave-core/commit/7b72bfaaaa33d22abf14fb4bdfced11bfade7410

        JBEHAVE-804: Improved test in PrintStreamOutputBehaviour

        Added a check for valid xml to the xml test method, more elaborate pending methods, changed the sequence of the test story to be more like actual stories (dry run moved below beforeStory and pending methods before afterStory).
        this way the story xml is proper xml.

        This doesn't change any main code, only the test was wrong.

        Show
        Alexander Lehmann added a comment - https://github.com/alexlehm/jbehave-core/commit/7b72bfaaaa33d22abf14fb4bdfced11bfade7410 JBEHAVE-804 : Improved test in PrintStreamOutputBehaviour Added a check for valid xml to the xml test method, more elaborate pending methods, changed the sequence of the test story to be more like actual stories (dry run moved below beforeStory and pending methods before afterStory). this way the story xml is proper xml. This doesn't change any main code, only the test was wrong.
        Mauro Talevi made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Mauro Talevi made changes -
        Fix Version/s 3.7 [ 18390 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Alexander Lehmann
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: