简体   繁体   English

jmock - mocking 一种以 long[] 作为输入并使用(any()) 的方法

[英]jmock - mocking a method with long[] as input and with(any())

I have a question related to jmock library.我有一个与 jmock 库有关的问题。 I am trying to mock a method that has a parameter of long[] and with(any()) .我正在尝试模拟一个参数为long[]with(any())的方法。 Is there a direct way to do that?有没有直接的方法可以做到这一点?

public class A
{
 public void Method_A(long[]  a)
 {
  //Do Somthing. need to mocking 
 }
}

Yes.是的。 Just use any(long[].class) .只需使用any(long[].class)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM