kk_oop
2010-07-26 18:38:06 UTC
Hi. I have a JUnit 4 TestCase, let's call it MyTestCase. I want to initialize some state once prior to running any of MyTestCase's tests. I see my options are to give MyTestCase some static attributes and initialize them with @BeforeClass or to give MyTestCase some instance attributes and initialize them with MyTestCase's constructor.
Any recommendations for one approach over the other?
Thanks!
Ken
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/junit/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/junit/join
(Yahoo! ID required)
<*> To change settings via email:
junit-***@yahoogroups.com
junit-***@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
junit-***@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
Any recommendations for one approach over the other?
Thanks!
Ken
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/junit/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/junit/join
(Yahoo! ID required)
<*> To change settings via email:
junit-***@yahoogroups.com
junit-***@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
junit-***@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/