【发布时间】:2020-06-07 15:49:18
【问题描述】:
在 Java Mockito 中,您可以像这样为每个调用模拟不同的返回值:
when(myMock.doTheCall())
.thenReturn("You failed")
.thenReturn("Success");
或者像这样:
when(myMock.doTheCall()).thenReturn("Success", "you failed");
来源:Simulate first call fails, second call succeeds
我想知道如何在 Dart Mockito 中实现同样的效果。我找不到那个文档
【问题讨论】: