• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to test CreditCardValidator class for run!

 
Tran Tuan Hung
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have a class CreditCardValidator with constructor:
For now i would test this class for run so i create i main method to test:

How to pass the JComponent parameter in "???" mark? Please help me to run this class . I read this class at here:
http://www.javalobby.org/java/forums/t20552.html
sorry for my stupid quesion and sorry for my bad English.
thanks so much.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This seems like a badly designed validator. It mixes the validation process with GUI functionality, thus limiting how you can use it. Have a look at Aapache Commons Validator instead; it validates credit cards, and has no GUI dependencies.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!