Mockito.any() pass Interface with Generics

前端 未结 7 1311
我在风中等你
我在风中等你 2020-11-29 16:26

is it possible to pass the type of an interface with generics?

The interface:

public interface AsyncCallback

In my test me

7条回答
  •  一个人的身影
    2020-11-29 17:02

    There is a type-safe way: use ArgumentMatchers.any() and qualify it with the type:

    ArgumentMatchers.>any()
    

提交回复
热议问题