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
@@ -11,9 +11,9 @@ MockHttpClient createMockImageHttpClient(SecurityContext _) {
|
||||
final MockHttpClientRequest request = new MockHttpClientRequest();
|
||||
final MockHttpClientResponse response = new MockHttpClientResponse();
|
||||
final MockHttpHeaders headers = new MockHttpHeaders();
|
||||
when(client.getUrl(typed(any))).thenReturn(new Future<HttpClientRequest>.value(request));
|
||||
when(client.getUrl(typed(any))).thenAnswer((_) => new Future<HttpClientRequest>.value(request));
|
||||
when(request.headers).thenReturn(headers);
|
||||
when(request.close()).thenReturn(new Future<HttpClientResponse>.value(response));
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user