EasyMock matcher for class data type

后端 未结 2 769
情话喂你
情话喂你 2021-01-15 03:30

I am having nightmares with the syntax for this and easymock:

public void foo(Class clazz);

EasyMock.expects(object.foo(EasyMock.isA(???)));
         


        
2条回答
  •  野的像风
    2021-01-15 04:21

    I think the following will also work as an expect statement if you don't want to use a Capture:

    EasyMock.expects(object.foo(EasyMock.isA(String.class.getClass())));
    

提交回复
热议问题