Loading ...
Sorry, an error occurred while loading the content.
 

ConcordionBuilder assertTrue and assertFalse Listeners

Expand Messages
  • adam.setch
    We have used the ConcordionBuilder to add a custom AssertEqualsListener that captures screenshots of the web application whenever a failure is reported. We
    Message 1 of 4 , Jul 20, 2010
      We have used the ConcordionBuilder to add a custom AssertEqualsListener that captures screenshots of the web application whenever a failure is reported.


      We would like to do the same for assertTrue and assertFalse, but have noticed there are no public methods to add listeners for assertTrue/assertFalse.


      Does anyone know why this is the case, or if there is a work around that we could adopt.



      Thanks in advance

      Adam
    • Nigel Charman
      Hi Adam The superclass BooleanCommand contains public methods to add listeners for assertTrue/assertFalse. The ConcordionBuilder class demonstrates this:
      Message 2 of 4 , Jul 25, 2010
        Hi Adam

        The superclass BooleanCommand contains public methods to add listeners for assertTrue/assertFalse.  The ConcordionBuilder class demonstrates this:

                assertTrueCommand.addAssertEqualsListener(new AssertEqualsResultRenderer());
                assertFalseCommand.addAssertEqualsListener(new AssertEqualsResultRenderer());

        HTH

        nigel

        adam.setch wrote:
         

        We have used the ConcordionBuilder to add a custom AssertEqualsListener that captures screenshots of the web application whenever a failure is reported.

        We would like to do the same for assertTrue and assertFalse, but have noticed there are no public methods to add listeners for assertTrue/assertFalse.

        Does anyone know why this is the case, or if there is a work around that we could adopt.

        Thanks in advance

        Adam

      • adam.setch
        Thanks for your reply Nigel. Thats good to know that BooleanCommand provides this functionality. However, ConcordionBuilder doesnt have a direct way of
        Message 3 of 4 , Jul 27, 2010
          Thanks for your reply Nigel.

          Thats good to know that BooleanCommand provides this functionality. However, ConcordionBuilder doesnt have a direct way of accessing the AssertTrueCommand/AssertFalseCommand.

          I guess thats the beauty of the public methods withAssertEqualsListener and withThrowableListener, is that they have internal access to the appropriate command objects.

          How would you gain access to assertTrueCommand or assertFalseCommand to achieve the same result. Is reflection the only way?


          Adam


          --- In concordion@yahoogroups.com, Nigel Charman <nigel.charman.nz@...> wrote:
          >
          > Hi Adam
          >
          > The superclass BooleanCommand contains public methods to add listeners
          > for assertTrue/assertFalse. The ConcordionBuilder class demonstrates this:
          >
          > assertTrueCommand.addAssertEqualsListener(new
          > AssertEqualsResultRenderer());
          > assertFalseCommand.addAssertEqualsListener(new
          > AssertEqualsResultRenderer());
          >
          > HTH
          >
          > nigel
          >
          > adam.setch wrote:
          > >
          > >
          > > We have used the ConcordionBuilder to add a custom
          > > AssertEqualsListener that captures screenshots of the web application
          > > whenever a failure is reported.
          > >
          > > We would like to do the same for assertTrue and assertFalse, but have
          > > noticed there are no public methods to add listeners for
          > > assertTrue/assertFalse.
          > >
          > > Does anyone know why this is the case, or if there is a work around
          > > that we could adopt.
          > >
          > > Thanks in advance
          > >
          > > Adam
          > >
          > >
          >
        • Nigel Charman
          Ah, I see what you mean Adam. It does looks like an oversight to not have withXXListener() methods for assertTrue, assertFalse, verifyRows and run. I suggest
          Message 4 of 4 , Jul 28, 2010
            Ah, I see what you mean Adam.  It does looks like an oversight to not have withXXListener() methods for assertTrue, assertFalse, verifyRows and run. I suggest you raise an issue on the Concordion issue list.

            Other than reflection, potential solutions I can see are patching ConcordionBuilder, or adding your own assertTrue and assertFalse commands in a different namespace - which I wouldn't recommend :-)

            cheers
            Nigel

            adam.setch wrote:
             

            Thanks for your reply Nigel.

            Thats good to know that BooleanCommand provides this functionality. However, ConcordionBuilder doesnt have a direct way of accessing the AssertTrueCommand/AssertFalseCommand.

            I guess thats the beauty of the public methods withAssertEqualsListener and withThrowableListener, is that they have internal access to the appropriate command objects.

            How would you gain access to assertTrueCommand or assertFalseCommand to achieve the same result. Is reflection the only way?

            Adam

            --- In concordion@yahoogroups.com, Nigel Charman <nigel.charman.nz@...> wrote:
            >
            > Hi Adam
            >
            > The superclass BooleanCommand contains public methods to add listeners
            > for assertTrue/assertFalse. The ConcordionBuilder class demonstrates this:
            >
            > assertTrueCommand.addAssertEqualsListener(new
            > AssertEqualsResultRenderer());
            > assertFalseCommand.addAssertEqualsListener(new
            > AssertEqualsResultRenderer());
            >
            > HTH
            >
            > nigel
            >
            > adam.setch wrote:
            > >
            > >
            > > We have used the ConcordionBuilder to add a custom
            > > AssertEqualsListener that captures screenshots of the web application
            > > whenever a failure is reported.
            > >
            > > We would like to do the same for assertTrue and assertFalse, but have
            > > noticed there are no public methods to add listeners for
            > > assertTrue/assertFalse.
            > >
            > > Does anyone know why this is the case, or if there is a work around
            > > that we could adopt.
            > >
            > > Thanks in advance
            > >
            > > Adam
            > >
            > >
            >

          Your message has been successfully submitted and would be delivered to recipients shortly.