|
From: <thi...@gm...> - 2005-04-19 09:35:46
|
Hi I'm also interested in feedback on multithreaded testing from NMock users/d= evs. I sometimes do a manual wait with a timeout, but maybe there's a better way already ? regards Thibaut Barr=E8re http://www.dotnetguru2.org/tbarrere 2005/4/18, Dean Hiller <dea...@bo...>: > =20 > =20 > =20 >=20 > Is there a way to use NMock to test subsystems that have different thread= s.=20 >=20 > =20 >=20 > Ie. I want to do something like this=20 >=20 > =20 >=20 > mockListener.setTimeout(10000);=20 >=20 > =20 >=20 > SysUnderTest.addClientListener(mockListener);=20 >=20 > SysUnderTest.invokeToStart();=20 >=20 > =20 >=20 > CalledMethod m =3D mockListener.expectMethodCall("someMethodOnListener");= =20 >=20 > =20 >=20 > Where expectMethodCall actually does a Monitor.Wait(timeout) because the > method "someMethodOnListener" is=20 >=20 > Invoked on a different thread and not invoked on the > SysUnderTest.invokeToStart() client thread(ie. The test thread)=20 >=20 > =20 >=20 > Is there a way to do this? Java's mocklib does this very nicely for this > type of testing.=20 >=20 > =20 >=20 > Thanks,=20 >=20 > dean=20 >=20 > ________________________________ > The information contained in this e-mail and any attachments hereto are = for > the exclusive use of the addressee and may contain confidential, privileg= ed > and nondisclosable information. If the recipient of this e-mail is not th= e > addressee, or a person responsible for delivering this e-mail to the > addressee, such recipient is strictly prohibited from reading, printing, > photocopying, distributing or otherwise using this e-mail or any attachme= nts > hereto in any way. If the recipient has received this e-mail in error, > please send return e-mail immediately notifying us of your receipt of thi= s > e-mail and delete the e-mail from your inbox. Thank you. |