0

I am using Google Mock framework to develop unit test cases. For all the classes that have default constructors, I am able to write a mock class and mock the required methods. But is it possible for us to write a mock class for a class with no default constructor/ with a constructor but with parameters?

4

1 回答 1

2

我们是否可以为没有默认构造函数/有构造函数但有参数的类编写模拟类?

绝对是的!我已经写过这样的模拟类。

你有什么特别的问题吗?然后请展示并让他们清楚。

于 2013-07-11T19:17:24.347 回答