【发布时间】:2013-11-13 09:15:09
【问题描述】:
我有这样声明的方法
private Long doThings(MyEnum enum, Long otherParam);
还有这个枚举
public enum MyEnum{
VAL_A,
VAL_B,
VAL_C
}
问题:如何模拟 doThings() 调用?
我无法匹配任何MyEnum。
以下不起作用:
Mockito.when(object.doThings(Matchers.any(), Matchers.anyLong()))
.thenReturn(123L);
【问题讨论】: