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

@@ -66,7 +66,7 @@ dependencies:
dev_dependencies:
test: 0.12.41
mockito: 3.0.0-alpha+5
mockito: 3.0.0-beta
quiver: 0.29.0+1
# PUBSPEC CHECKSUM: 1909
# PUBSPEC CHECKSUM: a03e

View File

@@ -40,7 +40,7 @@ void main() {
when(mockClient.getVM()).thenAnswer((_) => new Future<MockVM>.value(mockVM));
when(mockVM.isolates).thenReturn(<VMRunnableIsolate>[mockIsolate]);
when(mockIsolate.loadRunnable()).thenAnswer((_) => new Future<MockIsolate>.value(mockIsolate));
when(mockIsolate.invokeExtension(typed(any), typed(any))).thenAnswer(
when(mockIsolate.invokeExtension(any, any)).thenAnswer(
(Invocation invocation) => makeMockResponse(<String, dynamic>{'status': 'ok'}));
vmServiceConnectFunction = (String url) {
return new Future<VMServiceClientConnection>.value(
@@ -124,7 +124,7 @@ void main() {
});
test('checks the health of the driver extension', () async {
when(mockIsolate.invokeExtension(typed(any), typed(any))).thenAnswer(
when(mockIsolate.invokeExtension(any, any)).thenAnswer(
(Invocation invocation) => makeMockResponse(<String, dynamic>{'status': 'ok'}));
final Health result = await driver.checkHealth();
expect(result.status, HealthStatus.ok);
@@ -142,7 +142,7 @@ void main() {
});
test('finds by ValueKey', () async {
when(mockIsolate.invokeExtension(typed(any), typed(any))).thenAnswer((Invocation i) {
when(mockIsolate.invokeExtension(any, any)).thenAnswer((Invocation i) {
expect(i.positionalArguments[1], <String, String>{
'command': 'tap',
'timeout': _kSerializedTestTimeout,
@@ -162,7 +162,7 @@ void main() {
});
test('sends the tap command', () async {
when(mockIsolate.invokeExtension(typed(any), typed(any))).thenAnswer((Invocation i) {
when(mockIsolate.invokeExtension(any, any)).thenAnswer((Invocation i) {
expect(i.positionalArguments[1], <String, dynamic>{
'command': 'tap',
'timeout': _kSerializedTestTimeout,
@@ -181,7 +181,7 @@ void main() {
});
test('sends the getText command', () async {
when(mockIsolate.invokeExtension(typed(any), typed(any))).thenAnswer((Invocation i) {
when(mockIsolate.invokeExtension(any, any)).thenAnswer((Invocation i) {
expect(i.positionalArguments[1], <String, dynamic>{
'command': 'get_text',
'timeout': _kSerializedTestTimeout,
@@ -204,7 +204,7 @@ void main() {
});
test('sends the waitFor command', () async {
when(mockIsolate.invokeExtension(typed(any), typed(any))).thenAnswer((Invocation i) {
when(mockIsolate.invokeExtension(any, any)).thenAnswer((Invocation i) {
expect(i.positionalArguments[1], <String, dynamic>{
'command': 'waitFor',
'finderType': 'ByTooltipMessage',
@@ -219,7 +219,7 @@ void main() {
group('waitUntilNoTransientCallbacks', () {
test('sends the waitUntilNoTransientCallbacks command', () async {
when(mockIsolate.invokeExtension(typed(any), typed(any))).thenAnswer((Invocation i) {
when(mockIsolate.invokeExtension(any, any)).thenAnswer((Invocation i) {
expect(i.positionalArguments[1], <String, dynamic>{
'command': 'waitUntilNoTransientCallbacks',
'timeout': _kSerializedTestTimeout,
@@ -356,7 +356,7 @@ void main() {
group('sendCommand error conditions', () {
test('local timeout', () async {
when(mockIsolate.invokeExtension(typed(any), typed(any))).thenAnswer((Invocation i) {
when(mockIsolate.invokeExtension(any, any)).thenAnswer((Invocation i) {
// completer never competed to trigger timeout
return new Completer<Map<String, dynamic>>().future;
});
@@ -370,7 +370,7 @@ void main() {
});
test('remote error', () async {
when(mockIsolate.invokeExtension(typed(any), typed(any))).thenAnswer((Invocation i) {
when(mockIsolate.invokeExtension(any, any)).thenAnswer((Invocation i) {
return makeMockResponse(<String, dynamic>{
'message': 'This is a failure'
}, isError: true);