On Tue, Aug 3, 2010 at 8:24 PM, Alexandre Bergel <[email protected]>wrote:

> > I wonder, if the announcer is in TestResult, we only need one, no ?
>
> Could be. But how do you register in that case? TestResult is normally
> instantiated in TestCase>>run and TestSuite>>run
> You will need to shortcut sunit then...
>

I was thinking about something like:

TestResult class>>announcer
^ announcer ifNil: [announcer := Announcer new]

TestResult>>announce: anAnnouncement
self class announcer announce: anAnnouncement.

TestResult>>runCase: aTestCase
 | testCasePassed |
testCasePassed := true.
self announce: TestCaseStarted new. "set selector / class/ ..."

        [[aTestCase runCase]
on: self class failure
        .......

So I can write

TestResult announcer on: TestCaseStarted do: [:event |  Transcript show:
'new test started'].


Does it have sense ?

Laurent



>
> Alexandre
>
>
> >
> > Laurent
> >
> >
> >
> > Stef
> >
> > >
> > > Cheers,
> > > Alexandre
> > >
> > >
> > >
> > >>
> > >>>
> > >>> Cheers,
> > >>> Alexandre
> > >>> --
> > >>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> > >>> Alexandre Bergel  http://www.bergel.eu
> > >>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> _______________________________________________
> > >>> Pharo-project mailing list
> > >>> [email protected]
> > >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> > >>
> > >>
> > >> _______________________________________________
> > >> Pharo-project mailing list
> > >> [email protected]
> > >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> > >
> > > --
> > > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> > > Alexandre Bergel  http://www.bergel.eu
> > > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
> > >
> > >
> > >
> > >
> > >
> > >
> > > _______________________________________________
> > > Pharo-project mailing list
> > > [email protected]
> > > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> >
> >
> > _______________________________________________
> > Pharo-project mailing list
> > [email protected]
> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> >
> > _______________________________________________
> > Pharo-project mailing list
> > [email protected]
> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
>
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to