| | |
Stringtokenizer
Thread Solved |
•
•
Join Date: Apr 2006
Posts: 114
Reputation:
Solved Threads: 0
Hi all,
I have a quick question. Is this a proper way of using blackbox testing to test the stringTokenizer class? If not, would you provide a proper example that displays the pass or fail.
Thanks, KimJack
I have a quick question. Is this a proper way of using blackbox testing to test the stringTokenizer class? If not, would you provide a proper example that displays the pass or fail.
Java Syntax (Toggle Plain Text)
string = "cat, dog"; StringTokenizer token = new StringTokenizer(string, ","); if (token.countTokens() == 2) System.out.println("Passed"); else { System.out.println("Fail"); }
Thanks, KimJack
•
•
Join Date: Sep 2008
Posts: 1,580
Reputation:
Solved Threads: 199
Black box testing would involve trying to break your code by giving it invalid inputs and making sure it handles them appropriately, as well as giving it valid inputs and making sure it comes up with the right result. So I do not think your code counts as black box testing. . however, that isn't to say your test is invalid, it just isn't black box IMO.
Last edited by BestJewSinceJC; Sep 10th, 2009 at 9:11 pm.
Out.
![]() |
Similar Threads
- array from StringTokenizer (Java)
- help on using StringTokenizer to read and compute multiple lines from text (Java)
- StringTokenizer: To searh and replace a word. (Java)
- StringTokenizer (Java)
- StringTokenizer??? NEED HELP PLEASE!!! (Java)
- StringTokenizer (Java)
Other Threads in the Java Forum
- Previous Thread: using a resource from another package?
- Next Thread: Dice Game
| Thread Tools | Search this Thread |
2dgraphics 3d @param affinetransform android api applet application arc arguments array arrays automation banking binary bluetooth byte chat chatprogramusingobjects class client code color compare component count database design detection eclipse eclipsedevelopment encryption error fractal game givemetehcodez graphics gridlayout gui guitesting helpwithhomework html ide if_statement image input integer interface j2me java java.xls javadesktopapplications javaprojects jni jpanel julia keytool keyword linux list loop macintosh map method methods mobile netbeans newbie object os pong problem producer program programming project projectideas read recursion reference replaysolutions rim scanner server set size sms sort sql string swing terminal threads transforms tree ui unicode validation web windows






