Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以使用 mockito-flex 创建部分模拟?
Mockito-flex 目前不支持部分模拟。但是,您可以让您的模拟对象调用原始函数。
给定(someone.something(any())).will(callOriginal());
您可以添加一个便利功能,使您的模拟调用原始用于所有公共功能和属性。