| | |
Stringtokenizer
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
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,620
Reputation:
Solved Threads: 205
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 |
Tag cloud for Java
android api applet application apps array arrays automation awt bidirectional binary birt bluetooth busy_handler(null) calculator card chat class classes client code columns component constructor database designadrawingapplicationusingjavajslider draw eclipse editor error errors event eventlistener exception expand fractal game givemetehcodez graphics gui guidancer html ide image inetaddress input integer intellij j2me java javamicroeditionuseofmotionsensor javaprojects jme jni jpanel jtree julia link linux list loop map method methods mobile mobiledevelopmentcreatejar myaggfun netbeans newbie oracle parsing plazmic print problem program programming project recursion scanner screen server set sharepoint size smart sms smsspam sort sortedmaps sql string subclass support swing threads time tree unlimited webservices windows






