Bump mockito to 3.0.0-beta (#18462)

* Bump mockito to 3.0.0-beta

* Few fixes

* fix test

* Bump image

* Fix

* New packages update

* With matcher pinned

* No more typed
This commit is contained in:
Sam Rawlins
2018-06-21 16:23:47 -07:00
committed by Alexander Aprelev
parent bec912165a
commit 9f8a70be4c
32 changed files with 159 additions and 163 deletions

View File

@@ -13,7 +13,7 @@ dev_dependencies:
flutter_test:
sdk: flutter
mockito: 3.0.0-alpha+5
mockito: 3.0.0-beta
analyzer: 0.31.2-alpha.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
args: 1.4.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -66,4 +66,4 @@ dev_dependencies:
flutter:
uses-material-design: true
# PUBSPEC CHECKSUM: 3f92
# PUBSPEC CHECKSUM: 8dc7

View File

@@ -11,12 +11,12 @@ MockHttpClient createMockImageHttpClient(SecurityContext _) {
final MockHttpClientRequest request = new MockHttpClientRequest();
final MockHttpClientResponse response = new MockHttpClientResponse();
final MockHttpHeaders headers = new MockHttpHeaders();
when(client.getUrl(typed(any))).thenAnswer((_) => new Future<HttpClientRequest>.value(request));
when(client.getUrl(any)).thenAnswer((_) => new Future<HttpClientRequest>.value(request));
when(request.headers).thenReturn(headers);
when(request.close()).thenAnswer((_) => new Future<HttpClientResponse>.value(response));
when(response.contentLength).thenReturn(kTransparentImage.length);
when(response.statusCode).thenReturn(HttpStatus.ok);
when(response.listen(typed(any))).thenAnswer((Invocation invocation) {
when(response.listen(any)).thenAnswer((Invocation invocation) {
final void Function(List<int>) onData = invocation.positionalArguments[0];
final void Function() onDone = invocation.namedArguments[#onDone];
final void Function(Object, [StackTrace]) onError = invocation.namedArguments[#onError];
@@ -32,4 +32,4 @@ class MockHttpClientRequest extends Mock implements HttpClientRequest {}
class MockHttpClientResponse extends Mock implements HttpClientResponse {}
class MockHttpHeaders extends Mock implements HttpHeaders {}
class MockHttpHeaders extends Mock implements HttpHeaders {}