using a mock object in an @BeforeClass method

552 views
Skip to first unread message

Georgi Knox

unread,
Jul 20, 2009, 7:00:29 PM7/20/09
to moc...@googlegroups.com
HI There,
I have some expensive setup i need to run in an @BeforeClass method. Is there a way to use a mocked class in this method as it's static? Im getting all sorts of compile errors.

Thanks for your help!

Georgi

Georgi Knox

unread,
Jul 20, 2009, 7:25:51 PM7/20/09
to moc...@googlegroups.com
Sorry but I had made some mistakes in my code. ive now fixed this by declaring the mock within the setup method not using the @mock annotation.

Cheers
Reply all
Reply to author
Forward
0 new messages