Apply Mockito-related type fixes (#16002)

Type-related fixes in flutter_driver and fuchsia_remote_debug_protocol
tests.
This commit is contained in:
Chris Bracken
2018-03-27 15:27:24 -07:00
committed by GitHub
parent 040fbd2947
commit 39eeec47d6
3 changed files with 6 additions and 4 deletions

View File

@@ -31,7 +31,8 @@ void main() {
const String interface = 'eno1';
// Adds some extra junk to make sure the strings will be cleaned up.
when(mockRunner.run(typed(any)))
.thenReturn(<String>['123\n\n\n', '456 ', '789']);
.thenReturn(new Future<List<String>>.value(
<String>['123\n\n\n', '456 ', '789']));
when(mockRunner.address).thenReturn(address);
when(mockRunner.interface).thenReturn(interface);
int port = 0;

View File

@@ -40,7 +40,8 @@ void main() {
setUp(() {
mockProcessManager = new MockProcessManager();
mockProcessResult = new MockProcessResult();
when(mockProcessManager.run(typed(any))).thenReturn(mockProcessResult);
when(mockProcessManager.run(typed(any))).thenReturn(
new Future<MockProcessResult>.value(mockProcessResult));
});
test('verify interface is appended to ipv6 address', () async {