在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中实现相同的目标。我找不到相关的文档