标签归档文章: stackoverflow

Why do we need mocking frameworks like Easymock , JMock or Mockito?

Question: 为什么必须要使用mocking 框架呢?我们完全可以手动来写一个mock 类。

We use hand written stubs in our unit tests and I’m exploring the need for a Mock framework like EasyMock or Mockito in our project.

I do not find a compelling reason for switching to Mocking frameworks from hand written stubs.

Can anyone please answer why one would opt for mocking frameworks when they are already doing unit tests using hand written mocks/stubs.

更多…