Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-10-2008, 12:49 AM
Member
 
Join Date: Jun 2008
Posts: 1
alice is on a distinguished road
Junit test
Code:
_*A class called HWTime has been designed to hold details of time . The method signature have been designed :*_ {code} //constructor intialiazs to midnight (00:00) Public HWTime () //constructor intialises time to hours and minutes provided Public HWTime (int hours , int mins) //the String is supplied in the formal hh:mm //eg 09:30,23:07 Public setTime24(String time) //returns the time in minutes since midnight //eg.g 09:30 => 9 *60 + 30 = 570 Public int getTimeInMin() //returns the time as string in the format hh:mm //eg .09:30,23:07 Public int getTime24() //_The Question_ //// a) explain how Junit can be used to create a set of test for this class ///My Answer public boolean equals(Object otherObject) { MyTime otherDate = (MyTime) otherObject; if ( (this.hours == othertime.hours) && (this.mins == otherDate.mins)) return true; else return false; } /////b) Write Junit Test For this Method {code}
plz help me to answer this question
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-14-2008, 03:24 AM
Member
 
Join Date: Jun 2008
Posts: 22
ferranb is on a distinguished road
Checkout the begginers guide on junit.sourceforge.net ;-)
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Junit Azndaddy New To Java 6 06-15-2008 08:47 AM
Test Advisory Panel-Telecommute- Test your Java skills + share insights on Java tests michelle Jobs Offered 0 04-05-2008 02:38 AM
Testing JUnit PDE with Ant keynan Eclipse 0 02-15-2008 01:35 AM
Creating JUnit Test Cases using NetBeans JavaForums Java Blogs 0 08-06-2007 07:30 PM
TRying to use jUnit for Tesing sandor New To Java 3 04-19-2007 01:17 AM


All times are GMT +3. The time now is 02:51 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org