From: Pit Capitain Date: 2007-01-04T06:57:31+09:00 Subject: Re: Problem in Unit Testing Methods that start new threads Hemant Kumar schrieb: > I have a bit of doubt, in Unit Testing Programs that start new threads. > Please have a look at the code below: > (...) Hemant, in addition to what the others said, it's not clear to me what you really want to test: whether a new thread is started, whether the instance variable changed after a certain amount of time, whether the instance variable changed at the end of the new thread, ... I'm a fan of black box unit tests, so for me, the tests should specify what you expect from the *interface* of the object under test. I wouldn't test for values of certain instance variables or for threads created internally, unless those are part of the desired interface of your objects. Regards, Pit