Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JUnit test an Applet  RSS feed

 
Dar Var
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Does anyone know how the JUnit test an Applet.

Basically I want to be able to pass the applet parameters and make sure it's methods function correctly with these parameters.

The Applet is a non GUI Applet.

Any examples would be legend.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could add a main method so that the applet works as an application as well. Then you can override the "getParameter" method so that it either calls applet.getParameter (if run as an applet), or (e.g.) reads the parameters from a property file (if run as an application).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!