I proposed this test announcement facilities some times ago to get notified when tests are being executed and when they are done.
You said: "It means that you have to know which class to register to instead of which announcer." Which unit to register you mean? Yes, the one you are interested in. I do not see why it break the pattern. Consider TestCaseTest>>testAnnouncement. What is wrong with it? Cheers, Alexandre On 5 Apr 2012, at 06:14, Benjamin wrote: > Hello guys, > > I was implementing in Nautilus a listener to TestCaseStarted, and then I > figured out that each TestCase subclasses have its own Announcer. > > It means that you have to know which class to register to instead of which > announcer. In a way, it breaks the Observer pattern. > > Is there any good reason I am missing ? > > I think it has been done in a way you can spy a particular test class, but > since you have this info in the announcement itself, you can always filter > with this info. > Cause for me, replacing all those announcer by TestAnnouncer seems to be a > better solution. > > > > Thanks in advance, > > Ben -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
