Again move mockito to 300plus2 (#15981)
* Revert "Revert "Move mockito to 3.0.0-alpha. (#15949)" (#15979)"
This reverts commit e59651f925.
* More thenReturn to thenAnswer when mocking Futures
* Revert "More thenReturn to thenAnswer when mocking Futures"
This reverts commit 194d2cf41754ad171efd6bb5898cf73bce5a75ab as we are reverting engine roll.
* Revert "Revert "More thenReturn to thenAnswer when mocking Futures""
This reverts commit 52c9e96b304b220f66d78a252fccea0c8e0ef24c.
* Add dependency override
* Fix issue
This commit is contained in:
committed by
GitHub
parent
31049a5a73
commit
bffae21571
@@ -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
|
||||
|
||||
@@ -31,7 +31,7 @@ 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(new Future<List<String>>.value(
|
||||
.thenAnswer((_) => new Future<List<String>>.value(
|
||||
<String>['123\n\n\n', '456 ', '789']));
|
||||
when(mockRunner.address).thenReturn(address);
|
||||
when(mockRunner.interface).thenReturn(interface);
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -40,8 +40,8 @@ void main() {
|
||||
setUp(() {
|
||||
mockProcessManager = new MockProcessManager();
|
||||
mockProcessResult = new MockProcessResult();
|
||||
when(mockProcessManager.run(typed(any))).thenReturn(
|
||||
new Future<MockProcessResult>.value(mockProcessResult));
|
||||
when(mockProcessManager.run(typed(any))).thenAnswer(
|
||||
(_) => new Future<MockProcessResult>.value(mockProcessResult));
|
||||
});
|
||||
|
||||
test('verify interface is appended to ipv6 address', () async {
|
||||
|
||||
Reference in New Issue
Block a user