• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to create a Test Class to test the class methods are working.  RSS feed

 
Stephen Corrad
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have to create a TestDate class that help ensure whether my Date class methods are working. I have to create a class called TestDate whose constructor creates fifteen Date objects and displays the day of the week for the dates by calling each Date’s getDayOfTheWeek() method.
Any thoughts on how to start?

Thanks
SC
 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stephen Corrad wrote:I have to create a class called TestDate whose constructor creates fifteen Date objects and displays the day of the week for the dates by calling each Date’s getDayOfTheWeek() method.
Any thoughts on how to start?

Have a look here. Another possibility is here.

Hope one or t'other provide some help.

Winston
 
Stephen Corrad
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just need to create fifteen Date objects set at the date specified by the parameters (I have a list of 15 parameters). Any help?
 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stephen Corrad wrote:I just need to create fifteen Date objects set at the date specified by the parameters (I have a list of 15 parameters). Any help?

Did you look at the pages I suggested? I'm afraid nobody here is simply going to hand you the code.

Alternatively, show us what you've tried, and what your problems are.

Winston
 
Liutauras Vilda
Sheriff
Posts: 4917
334
BSD
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The start could look something like:

It would become clearer, if you'd read what Winston already suggested for you.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!