> event := anAnnouncementClass isBehavior
>                               ifTrue: [ anAnnouncementClass new ] 
>                               ifFalse: [  anAnnouncementClass ].
> 
> Why anAnnouncementClass would not be a class? 

True. I wasn't sure.
SLICE-Issue-2721-AnnouncementsForSUnit-Alexandre_Bergel.3 in the inbox. I also 
use #asAnnouncement, as suggested by Lukas.

Cheers,
Alexandre


> 
> 
> announce: anAnnouncementClass withResult: result
>       | event |
>       self shouldAnnounce ifFalse: [ ^ self ].
>       
>       event := anAnnouncementClass isBehavior
>                               ifTrue: [ anAnnouncementClass new ] 
>                               ifFalse: [  anAnnouncementClass ].
>       event testCase: self.
>       event testSelector: testSelector.
>       event result: result.
>       self announcer announce: event.
> 
> 
> 
> On Aug 2, 2010, at 12:47 PM, Stéphane Ducasse wrote:
> 
>> I will integrate it.
>> I was thinking that WindowOpened is not that english but it has the 
>> advantage that all the events of a certain kinds are grouped.
>> 
>> Stef
>> 
>> 
>> On Aug 2, 2010, at 12:08 PM, Alexandre Bergel wrote:
>> 
>>> hi!
>>> 
>>> In PharoInbox there is: 
>>> SLICE-Issue-2721-AnnouncementsForSUnit-Alexandre_Bergel.2
>>> The comment of this slice is: 
>>> -=-=-=-=-=-=-=-=-=-=-=-=
>>> Renamed the event classes into:
>>> TestCaseAnnouncement
>>> -- TestCaseStarted
>>> -- TestCaseEnded
>>> 
>>> Event are also emitted in TestResult>>runCase: like this, the result of the 
>>> test execution is accessible from the event.
>>> (Thanks Laurent Laffon for these suggestions)
>>> -=-=-=-=-=-=-=-=-=-=-=-=
>>> 
>>> Cheers,
>>> Alexandre
>>> 
>>> On 29 Jul 2010, at 22:22, laurent laffont wrote:
>>> 
>>>> On Thu, Jul 29, 2010 at 7:42 PM, Henrik Sperre Johansen 
>>>> <[email protected]> wrote:
>>>> On 29.07.2010 17:45, Alexandre Bergel wrote:
>>>> Wow ! Fast !.
>>>> 
>>>> That means it should be easy now to do a lot of exciting stuff. Show tests 
>>>> progression, errors/failures as soon as they occur, log several things, 
>>>> drink cocktails,  meet beautiful girls ....that's really cool.
>>>> I will be in winter time in 1 week time. We have to enjoy now
>>>> 
>>>> Alexandre
>>>> Nice!
>>>> Maybe it's just me, or could we not add Announcement to the end of every 
>>>> Announcement subclass name though?
>>>> Like with the window announcement, I like them better as verbs describing 
>>>> the event, f.ex.
>>>> someAnnouncer on: TestStarted do: []
>>>> someAnnouncer on: TestEnded send: #x to: y
>>>> 
>>>> +1. I propose
>>>> TestCaseAnnouncement
>>>> -- TestCaseStarted
>>>> -- TestCaseEnded
>>>> 
>>>> 
>>>> Shouldn't we put announce in TestResult>>runCase: instead of 
>>>> TestCase>>runCase ? This way we can pass the result to the Annoucement 
>>>> object.
>>>> 
>>>> 
>>>> Actually, self announce: SUTestEndAnnouncement. is not in the ensure: 
>>>> block. So if the test fails there's no annoucement sent.
>>>> 
>>>> 
>>>> Cheers,
>>>> 
>>>> Laurent
>>>> 
>>>> 
>>>> 
>>>> Cheers,
>>>> Henry
>>>> 
>>>> 
>>>> _______________________________________________
>>>> 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

Reply via email to