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...
20737
David Saff
dsaff
Aug 1, 2008 2:26 pm
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...
20738
mfugleru
magnusfuglerud
Aug 1, 2008 3:18 pm
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...
20739
David Saff
dsaff
Aug 1, 2008 3:29 pm
... 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...
20740
David Saff
dsaff
Aug 1, 2008 3:45 pm
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....
20741
David Saff
dsaff
Aug 1, 2008 3:53 pm
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...
20742
David Saff
dsaff
Aug 1, 2008 3:53 pm
All, That link would be: https://sourceforge.net/project/showfiles.php?group_id=15278 Thanks, David Saff...
20743
David Saff
dsaff
Aug 1, 2008 3:55 pm
Not by Kent or me. Anyone maven-savvy willing to take this on as their penance or public service would be much appreciated. David Saff...
20744
Cédric Beust
cbeust
Aug 1, 2008 4:06 pm
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...
20745
David Saff
dsaff
Aug 1, 2008 4:58 pm
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...
20747
David Saff
dsaff
Aug 1, 2008 5:37 pm
... I assert that I can automatically add a line to canLogin, and rename it, and end up with: testServlet1() { assumeTrue(serverStartedAndCanLogin()); } ...
20748
Alex Ruiz
alruiz15
Aug 1, 2008 5:40 pm
+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:...
20749
toalexsmail
Aug 2, 2008 9:51 pm
Thank you, Kent! I guess Link is actually statement. ... precise ... "David Saff" ... class....
20750
toalexsmail
Aug 2, 2008 9:51 pm
... 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...
20751
tawqir_wei
Aug 3, 2008 9:25 pm
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...
20752
Mike Hill
uly562000
Aug 3, 2008 9:46 pm
junit, used correctly, has no issues testing recursive functions. but you can't/don39;t normally write test functions that themselves recurse. Maybe if you...
20753
David Saff
dsaff
Aug 4, 2008 9:56 am
... 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...
20754
fuguo wei
tawqir_wei
Aug 4, 2008 10:56 am
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...
20755
fuguo wei
tawqir_wei
Aug 4, 2008 1:38 pm
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 )...
20756
Robin de Silva Jayasi...
robinjay33
Aug 4, 2008 1:38 pm
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...
20757
kentb
kentlbeck
Aug 4, 2008 3:57 pm
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...
20758
toalexsmail
Aug 4, 2008 9:30 pm
Hello, Robin! Alternative way will be to use inheritance. It will be something like this. public class Base { @Before public void setUp(){ ... } @After public...
20759
toalexsmail
Aug 4, 2008 9:30 pm
... No, I am not. I just want that doYourOneTimeSetup() would be run once for ANY suite that run. doYourOneTimeSetup() will startup microcontainer. Parameters...
20760
Fuguo Wei
tawqir_wei
Aug 5, 2008 11:34 am
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...
20761
David Saff
dsaff
Aug 6, 2008 10:22 am
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...
20762
David Saff
dsaff
Aug 6, 2008 10:27 am
... 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...
20763
David Saff
dsaff
Aug 6, 2008 4:01 pm
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...
20764
Nat Pryce
nat_pryce
Aug 6, 2008 5:59 pm
... It works fine with jMock 2. Thanks. --Nat....
20765
David Saff
dsaff
Aug 6, 2008 6:01 pm
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...