Perhaps, but I think I prefer overriding run().  That way you can do
whatever you need: catch exceptions, add a finally block, and so on.

On 2 August 2012 15:37, Mauro Talevi <[email protected]> wrote:
> Yep, that works.    We could also add a before/after run hook to the
> Embeddable interface to avoid the need to override run().   E.g.
>
> beforeRun();
>
> afterRun();
>
> They would by default be executed noop methods and users can implement them
> to do pre and post run operations programmatically.
>
>
> On 02/08/2012 14:53, James Shaw wrote:
>>
>> On 2 August 2012 12:04, Mauro Talevi <[email protected]> wrote:
>>>
>>> The PerformableTree is accessible from the StoryManager, which is
>>> accessible
>>> from the Embedder.
>>>
>>> Embedder.storyManager().performableTree().
>>
>> Aha, that works much better, thanks.  I guess I can execute my code to
>> walk the tree by overriding JUnitStory.run() like this:
>>
>> public void run() throws Throwable {
>>      try {
>>          super.run();
>>      } finally {
>>
>> timingsCollector.report(configuredEmbedder().storyManager().performableRoot();
>>      }
>> }
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>      http://xircles.codehaus.org/manage_email
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to