• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Jj Roberts
  • Tim Holloway
  • Piet Souris
  • Himai Minh
  • Carey Brown
  • salvin francis

ScheduledExecutorService EasyMock Test

Ranch Hand
Posts: 1491
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to implement Runnable's run() method in EasyMock Test class ?

Posts: 689
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not white sure what you mean by your question, could you clarify? What is it you're trying to do and what error do you get?

However, a few things I do notice:

* Are you sure that is EasyMock? It looks identical to Mockito to me.

* Your scheduler() method is not easily testable. It takes no parameters and creates its own variables. You can't mock the Runnable it is using because you aren't using dependency injection.

* The scheduler() creates an infinite loop that does nothing but repeatedly call the scheduler() method. What is there to test?
    Bookmark Topic Watch Topic
  • New Topic