> >assertTrue("Whoa, doSomething returned a non-Fred type!", doSomething() > >instanceof Fred);
When the test fails, you don't have a lot of information (like the class returned by doSomething) to debug your code. <ads> Using JUnit-addons, you would code your assertion: ObjectAssert.assertInstanceOf(Fred, doSomething()); The error message will be something like: "expected instance of class:<Fred> but was of class <WHATEVER>" at least you have something to start your debug session. </ads> -Vladimir PS: junit-addons.sf.net -- Vladimir R. Bossicard www.bossicard.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]