Move mockito to 3.0.0-alpha. (#15949)
* Move mockito to 3.0.0-alpha. This is needed so it matches mockito version used internally. * Pick up +2 for the fixes * Fix whenReturn in fuchsia_remote_debug_protocol * more thenReturn becomes thenAnswer * more thenReturn becomes thenAnswer * more thenReturn becomes thenAnswer
This commit is contained in:
committed by
GitHub
parent
067be92ae8
commit
a7e6225820
@@ -46,14 +46,14 @@ void main() {
|
||||
]);
|
||||
final Process process = new MockProcess();
|
||||
|
||||
when(process.stdout).thenReturn(stdout);
|
||||
when(process.stderr).thenReturn(const Stream<List<int>>.empty());
|
||||
when(process.exitCode).thenReturn(new Future<int>.value(0));
|
||||
when(process.stdout).thenAnswer((_) => stdout);
|
||||
when(process.stderr).thenAnswer((_) => const Stream<List<int>>.empty());
|
||||
when(process.exitCode).thenAnswer((_) => new Future<int>.value(0));
|
||||
when(mockProcessManager.start(
|
||||
<String>['git', 'branch', '-r'],
|
||||
workingDirectory: typed(any, named: 'workingDirectory'),
|
||||
environment: typed(any, named: 'environment')))
|
||||
.thenReturn(new Future<Process>.value(process));
|
||||
.thenAnswer((_) => new Future<Process>.value(process));
|
||||
|
||||
final ChannelCommand command = new ChannelCommand();
|
||||
final CommandRunner<Null> runner = createTestCommandRunner(command);
|
||||
|
||||
@@ -30,7 +30,7 @@ void main() {
|
||||
when(mockFrontendServer.stderr)
|
||||
.thenAnswer((Invocation invocation) => mockFrontendServerStdErr);
|
||||
final StreamController<String> stdErrStreamController = new StreamController<String>();
|
||||
when(mockFrontendServerStdErr.transform<String>(any)).thenReturn(stdErrStreamController.stream);
|
||||
when(mockFrontendServerStdErr.transform<String>(any)).thenAnswer((_) => stdErrStreamController.stream);
|
||||
when(mockFrontendServer.stdin).thenReturn(mockFrontendServerStdIn);
|
||||
when(mockProcessManager.canRun(any)).thenReturn(true);
|
||||
when(mockProcessManager.start(any)).thenAnswer(
|
||||
|
||||
Reference in New Issue
Block a user