EasyMock is used to create an ExchangeRate object that always supplies the value 1.5.
使用EasyMock创建一个总是提供值1.5的ExchangeRate对象。
The ExchangeRate interface was small and simple enough that I could have easily written the mock class manually.
ExchangeRate接口很小很简单,很容易为它手工编写mock类。
And even if it did by some miracle return ExchangeRate, what happens when I need to mock an instance of a different interface?
即使它能够通过某种奇迹返回ExchangeRate,但是如果需要模拟另一个接口的实例,又会怎么样呢?
And even if it did by some miracle return ExchangeRate, what happens when I need to mock an instance of a different interface?
即使它能够通过某种奇迹返回ExchangeRate,但是如果需要模拟另一个接口的实例,又会怎么样呢?
应用推荐