Search the web
Sign In
New User? Sign Up
junit · JUnit, the Java unit testing framework written by Kent Beck and Erich Gamma.
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Messages 14554 - 14583 of 22044   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Simplify | Expand   (Group by Topic) Author Sort by Date ^
14554
... David Saff ... [snip] ... Cedric, I've been telling you this for a year or so... Tests get instantiated at the start (one instance per test), they are run,...
Robert Watkins
robertdw26
Offline Send Email
Sep 1, 2005
7:33 am
14555
... Correction: you don't have to maintain state across methods. Because each test is in its instance, there is no possibility of having the state modified. ...
Robert Watkins
robertdw26
Offline Send Email
Sep 1, 2005
8:17 am
14556
hello group, When i was unit testing my SAX parser implementation to parse my xml file, i faced one problem. i want to test the startElement(...) method of the...
bskmohan
Offline Send Email
Sep 1, 2005
8:25 am
14557
The very minute I hit "send" I knew I would get a remark on that ;-)...
Java Questions
my_java_ques...
Offline Send Email
Sep 1, 2005
8:25 am
14558
... I understand, although with proper naming conventions and "packaging", it's not that hard to keep track of who's who... I also like to mention all the...
Java Questions
my_java_ques...
Offline Send Email
Sep 1, 2005
8:27 am
14559
... I don't understand the problem. Could you please elaborate? As an aside, common practice is to not test methods, but behaviour. Cheers, Ilja...
Ilja Preuss
ipreussde
Offline Send Email
Sep 1, 2005
9:45 am
14560
... I imagine that there could be a language that replaced parameter passing by an alternative mechanism, without being unpleasant. Of course to someone used...
Ilja Preuss
ipreussde
Offline Send Email
Sep 1, 2005
10:23 am
14561
... It the code isn't tested through the public (or protected) then you aren't testing it in the context in which it will actually be used. Private methods are...
Elliotte Harold
elharo@...
Send Email
Sep 1, 2005
10:32 am
14562
... It is certainly possible to test private methods, but I prefer not to do it. I prefer to make the method public, test it, then figure out why it was...
J. B. Rainsberger
nails762
Offline Send Email
Sep 1, 2005
12:05 pm
14563
... Google "Parameterized Test Case" or look at _JUnit Recipes_, chapters 4 and 5. -- J. B. (Joe) Rainsberger Diaspar Software Services ...
J. B. Rainsberger
nails762
Offline Send Email
Sep 1, 2005
12:05 pm
14564
... JBR's postulate 1. For every testable design that requires exposing elements "just for testing", there exists an equivalent testable design that does not...
J. B. Rainsberger
nails762
Offline Send Email
Sep 1, 2005
12:06 pm
14565
hi lets assume class is SimpleMathTest.class and resides at c:java\bin try at console following command c:\java\bin\java -cp c:java\bin; SimpleMathTest why is...
Maruthi Kusoji
maruthi_kn
Offline Send Email
Sep 1, 2005
1:36 pm
14566
Hi. I have implemented an algorithm in Java which produces state cover, shortest paths to get another statefrom start state, from a finite state machine(FSM)....
haggaikeithme
Offline Send Email
Sep 1, 2005
3:20 pm
14567
... Nice. After thinking about it for awhile, here are some things I think could be done (in order) before making private methods public for testing when you...
Jim Cakalic
jim_cakalic
Offline Send Email
Sep 1, 2005
3:20 pm
14568
Actually, if you were really following TDD then you wouldn't have the private method unless it was already covered by tests. At least that's the methodology I...
David Jackman
djackmanq
Offline Send Email
Sep 1, 2005
4:49 pm
14569
The formula works like this (it doesn't really matter what your code actually does). Your library/algorithm takes some input and produces some output. Your...
David Jackman
djackmanq
Offline Send Email
Sep 1, 2005
4:49 pm
14570
... I don't see this as a solution. If the method wasn't public before, it shouldn't be public now just because it moved to a different class. If the only...
Elliotte Harold
elharo@...
Send Email
Sep 1, 2005
5:24 pm
14571
... If using TDD you are slowly emerging the design. Why would Extract Class not be a valid refactoring? At some point a private method on a class wants to be...
Shane Mingins
shanemingins
Offline Send Email
Sep 1, 2005
6:36 pm
14572
... I believe Elliote wants to minimize the public API to make it easier to use. Martin Fowler has a nice article on using interfaces to achieve the same...
Kevin Lawrence
kevinwilliam...
Offline Send Email
Sep 1, 2005
6:43 pm
14573
... David, This is the way I practice TDD as well -- test first. I've been learning that not everyone is as disciplined as we are. Code coverage tools /can/ be...
Jim Cakalic
jim_cakalic
Offline Send Email
Sep 1, 2005
6:46 pm
14574
... Elliotte, I agree that privates should be kept private, encapsulation should not be broken for the purpose of testing, and that the number of messages in...
Jim Cakalic
jim_cakalic
Offline Send Email
Sep 1, 2005
6:47 pm
14575
... If extracting a class causes a method to become public that otherwise wouldn't be public, then it's a problem. Public APIs are rigid and inflexible. Public...
Elliotte Harold
elharo@...
Send Email
Sep 1, 2005
6:50 pm
14576
... That's basically correct in general. The problem is that Java doesn't have a real distinction between public and published. If it's public, then it's...
Elliotte Harold
elharo@...
Send Email
Sep 1, 2005
6:54 pm
14577
Certainly. My point (which came out wrong) was that if the class was written test-first then I wouldn't feel like I needed to use a coverage tool to be sure...
David Jackman
djackmanq
Offline Send Email
Sep 1, 2005
7:15 pm
14578
Hi. David. Yeah, Could you give me some more details where I can get the examples and how to test them? Or any web materials. Thanks a lot. Regards,...
jin beck
haggaikeithme
Offline Send Email
Sep 1, 2005
7:51 pm
14579
Hi Jin, I am not David, but I want to make a comment. David provided a general recipe for testing algorithms. Since you are designer of the algorithm, at the...
Mikhail Shnayderman
mschnayd
Offline Send Email
Sep 1, 2005
10:17 pm
14580
... Sure, but you're still simulating passing parameters to methods by passing them to your constructors. Not the most intuitive way. Out of curiousity: any...
Cedric Beust
cbeust
Offline Send Email
Sep 1, 2005
10:37 pm
14581
Apologies if this is OT, but IMHO coverage measurement (for guiding one's test writing) and IDEs (for writing and running one's tests) are both at least...
Thomas L Roche
tlroche
Offline Send Email
Sep 2, 2005
12:27 am
14582
http://junit.sourceforge.net/doc/testinfected/testing.htm <http://junit.sourceforge.net/doc/testinfected/testing.htm> is the traditional page for getting...
David Jackman
djackmanq
Offline Send Email
Sep 2, 2005
1:32 am
14583
... Global data makes testing more difficult, so I'd avoid it if possible. Do you have control over instantiating your SAX event handler? (It's been over 5...
J. B. Rainsberger
nails762
Offline Send Email
Sep 2, 2005
2:25 am
Messages 14554 - 14583 of 22044   Oldest  |  < Older  |  Newer >  |  Newest
Advanced
Add to My Yahoo!      XML What's This?

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help