|
From: Dean H. <dea...@Bo...> - 2005-04-19 13:28:32
|
If there is no way at this time, I would be happy to port java's mocklib = to C#! Thanks, dean -----Original Message----- From: Thibaut Barr=E8re [mailto:thi...@gm...]=20 Sent: Tuesday, April 19, 2005 3:36 AM To: Dean Hiller Cc: nmo...@li... Subject: Re: [Nmock-general] asynchronous testing Hi I'm also interested in feedback on multithreaded testing from NMock = users/devs. 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 = threads.=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, = privileged > and nondisclosable information. If the recipient of this e-mail is not = the > 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 = attachments > 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 = this > e-mail and delete the e-mail from your inbox. Thank you. |