Alex, First, assumptions can go in individual test methods, or in @BeforeClass on a test class (to short-circuit many methods), or in @BeforeClass on a suite...
On Thu, Jul 31, 2008 at 3:46 AM, Hans Schwaebli ... Given that "boolean canLogin()" exists, I see a one-line difference between public static boolean CAN_LOGIN...
Hello, I am trying to build my java project with a build.xml file using ant in eclipse. The problem is the JUnit part of the build (it builds sucessfull...
... No and no. That test was excellent: any subclass of JUnit4ClassRunner would have had similar problems. The fix is in HEAD, and will be in beta 4. David...
Robin, I didn't go back and check this with beta 3, but 4.5 beta 4 seems to work as expected. I'll release later today: let me know if the problem persists....
All, Here's yet another beta of JUnit 4.5. Major bugs reported with previous betas have been fixed, and two more classes useful for extenders have been...
This approach doesn't scale as soon as you need to depend on more than one method (what do you do later down the road when you need to add one method to the...
If I had a bunch of methods depending on canLogin(), and then discovered that all of those methods also depended on answering a captcha, I would use my IDE to...
Consider this: testServlet1() { assume(canLogin()); } testServlet2() { assume(canLogin()); } And you want to add another dependency, say "serverStarted()". Now...
... I assert that I can automatically add a line to canLogin, and rename it, and end up with: testServlet1() { assumeTrue(serverStartedAndCanLogin()); } ...
+1 test groups IMHO, test groups are a lot more "refactoring-friendly" than method names. For example, I use the following class to specify all my test groups:...
... It is actually evening now. ... First of all, I happy to know about this way of testing. Does it available in JUnit 4.4? (I don't have the code to look on...
In my program, I used the recursive techniques which I guess it's good soluction. But when I tried to use Junit to test the recursive unit part. the...
junit, used correctly, has no issues testing recursive functions. but you can't/don't normally write test functions that themselves recurse. Maybe if you...
... Yes. ... I actually don't quite understand this. Are you saying that you're changing the startup parameters to your microcontainer by hand between each...
Dear all, I am so glad to get your response. Thank you again. Maybe I used it wrong. I was wandering where I am wrong for a few days. I am confused. Kindly...
Dear guys, if you the mail I sent before was not readable. the souce code(stackOverfloww error socurce code.txt ) and and the error message(JUniterror.jpg )...
Hi List! Today I asked myself whether there is a given order if I decorate multiple methods in one class with @Before or @After. All of the methods are...
Robin, There is no defined order to the execution of Before and After methods. If you have two bits of setup that are temporally coupled, the most direct way I...
Hello, Robin! Alternative way will be to use inheritance. It will be something like this. public class Base { @Before public void setUp(){ ... } @After public...
... No, I am not. I just want that doYourOneTimeSetup() would be run once for ANY suite that run. doYourOneTimeSetup() will startup microcontainer. Parameters...
Dear all, I am so upset about the problem I encountered. Wish any one could help me. Thank here first. It's the StackOverflowError problem. I thought It's...
Fuguo, I'm sorry this has been bugging you. It's difficult to understand how JUnit could be encountering a recursion loop that wasn't there in your production...
... Can you define doYourOneTimeSetup in a superclass of the suites, and have all of your suites inherit from it? ... So the suite that you want to run often...
All, http://sourceforge.net/project/showfiles.php?group_id=15278 is release candidate 1 of JUnit 4.5. We believe that we've addressed all bugs found by our...
Robin, Have you looked at whether your job is easier JUnit 4.5? We've made a lot more functionality non-internal, which I hope would help. Thanks, David Saff...