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
@@ -62,7 +62,7 @@ dependencies:
|
||||
yaml: 2.1.13 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
dev_dependencies:
|
||||
mockito: 2.2.3
|
||||
mockito: 3.0.0-alpha+2
|
||||
test: 0.12.32+2
|
||||
|
||||
# PUBSPEC CHECKSUM: 97d6
|
||||
|
||||
@@ -100,7 +100,7 @@ void main() {
|
||||
mockPeerConnections.add(mp);
|
||||
uriConnections.add(uri);
|
||||
when(mp.sendRequest(typed<String>(any), typed<String>(any)))
|
||||
.thenReturn(new Future<Map<String, dynamic>>(
|
||||
.thenAnswer((_) => new Future<Map<String, dynamic>>(
|
||||
() => flutterViewCannedResponses[flutterViewIndex++]));
|
||||
return mp;
|
||||
});
|
||||
|
||||
@@ -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