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
@@ -86,7 +86,7 @@ void main() {
|
||||
Future<json_rpc.Peer> mockVmConnectionFunction(Uri uri) {
|
||||
when(mockPeer.sendRequest(
|
||||
typed<String>(any), typed<Map<String, dynamic>>(any)))
|
||||
.thenReturn(new Future<Map<String, dynamic>>(
|
||||
.thenAnswer((_) => new Future<Map<String, dynamic>>(
|
||||
() => flutterViewCannedResponses));
|
||||
return new Future<json_rpc.Peer>(() => mockPeer);
|
||||
}
|
||||
@@ -135,7 +135,7 @@ void main() {
|
||||
Future<json_rpc.Peer> mockVmConnectionFunction(Uri uri) {
|
||||
when(mockPeer.sendRequest(
|
||||
typed<String>(any), typed<Map<String, dynamic>>(any)))
|
||||
.thenReturn(new Future<Map<String, dynamic>>(
|
||||
.thenAnswer((_) => new Future<Map<String, dynamic>>(
|
||||
() => flutterViewCannedResponseMissingId));
|
||||
return new Future<json_rpc.Peer>(() => mockPeer);
|
||||
}
|
||||
@@ -173,7 +173,7 @@ void main() {
|
||||
Future<json_rpc.Peer> mockVmConnectionFunction(Uri uri) {
|
||||
when(mockPeer.sendRequest(
|
||||
typed<String>(any), typed<Map<String, dynamic>>(any)))
|
||||
.thenReturn(new Future<Map<String, dynamic>>(
|
||||
.thenAnswer((_) => new Future<Map<String, dynamic>>(
|
||||
() => flutterViewCannedResponseMissingIsolateName));
|
||||
return new Future<json_rpc.Peer>(() => mockPeer);
|
||||
}
|
||||
@@ -208,7 +208,7 @@ void main() {
|
||||
// Return a command that will never complete.
|
||||
when(mockPeer.sendRequest(
|
||||
typed<String>(any), typed<Map<String, dynamic>>(any)))
|
||||
.thenReturn(new Completer<Map<String, dynamic>>().future);
|
||||
.thenAnswer((_) => new Completer<Map<String, dynamic>>().future);
|
||||
return new Future<json_rpc.Peer>(() => mockPeer);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user