jjzjj

GetDesign

全部标签

testing - 在 Kotlin 中使用 Mockito doAnswer

与这段Java代码等效的Kotlin是什么?doAnswer(newAnswer(){@OverridepublicObjectanswer(InvocationOnMockinvocation)throwsThrowable{Designdesign=newDesign();GetDesign.Listenercallback=(GetDesign.Listener)invocation.getArguments()[0];callback.onSuccess(design);returnnull;}}).when(someRepository).getDesign(any(GetD

testing - 在 Kotlin 中使用 Mockito doAnswer

与这段Java代码等效的Kotlin是什么?doAnswer(newAnswer(){@OverridepublicObjectanswer(InvocationOnMockinvocation)throwsThrowable{Designdesign=newDesign();GetDesign.Listenercallback=(GetDesign.Listener)invocation.getArguments()[0];callback.onSuccess(design);returnnull;}}).when(someRepository).getDesign(any(GetD