|
From: John M. H. <ma...@ni...> - 2006-06-20 18:04:20
|
I've just been: 1. running all the async calls, 2. setting flags as to how they function as they return, 3. waiting until all sync calls have completed one way or another, 4. calling super.run(), 5. and then testing the flags in my test methods. Other than making a new TestCase for each async call, this seems to be the only way to go, right? You don't get the benefits of setUp() and tearDown() between test methods this way, but, eh, whatever. > > From: "Paul BH" <eye...@gm...> > Date: 2006/06/20 Tue PM 12:56:54 CDT > To: asu...@li... > Subject: Re: [Asunit-users] asyncronous individual test, *not* asynch setup? > > Hi matey - long time no chat... > > I use async tests for testing method calls that you expect to trigger > an event at some time in the future.So lets say for example that I > have a class that takes some xml, does some shizzle with it and > broadcasts an event when its done. > > I would use standard overriding of run to load the xml - so far so > good, but testing that this class dispatches an event when > parseMyStuff gets called is a testMethod specific async case. there > may be another test method within the same testCase that sends its > result immediately, and I certainly wouldnt want to call parseMyStuff > in the setup (as its specific to just one test) > > make sense, or am i just rambling? > > PBH > > On 6/20/06, Alias <ali...@gm...> wrote: > > Hi Paul! > > > > Why can't you override run? Where does the result come from? > > > > Cheers, > > Alias > > > > On 6/20/06, Paul BH <eye...@gm...> wrote: > > > Hello, > > > me again - I have another situation, that Im not sure if anyone has > > > come across / solved? > > > > > > I need to be able to run a test whose result is asynchronous. This is > > > not necessarily the same as an asynchronous setup, so I dont really > > > want to be overriding run (which is what i normally do with an async > > > test...) > > > > > > has anyone done this, got a strategy for doing this in ASUnit (3)? > > > > > > ta > > > > > > PBH > > > > > > > > > _______________________________________________ > > > Asunit-users mailing list > > > Asu...@li... > > > https://lists.sourceforge.net/lists/listinfo/asunit-users > > > > > > > > > _______________________________________________ > > Asunit-users mailing list > > Asu...@li... > > https://lists.sourceforge.net/lists/listinfo/asunit-users > > > > > _______________________________________________ > Asunit-users mailing list > Asu...@li... > https://lists.sourceforge.net/lists/listinfo/asunit-users > -- John Mark Hawley The Nilbog Group 773.968.4980 (cell) |