Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(794)

Side by Side Diff: pkg/analysis_server/test/mocks.dart

Issue 217153002: pkg/analysis_server: fixes for unittest deprecations (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library mocks; 5 library mocks;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import 'package:analysis_server/src/analysis_server.dart'; 10 import 'package:analysis_server/src/analysis_server.dart';
11 import 'package:analysis_server/src/channel.dart'; 11 import 'package:analysis_server/src/channel.dart';
12 import 'package:analysis_server/src/protocol.dart'; 12 import 'package:analysis_server/src/protocol.dart';
13 import 'package:unittest/matcher.dart'; 13 import 'package:matcher/matcher.dart';
14 14
15 /** 15 /**
16 * Answer the absolute path the the SDK relative to the currently running 16 * Answer the absolute path the the SDK relative to the currently running
17 * script or throw an exception if it cannot be found. 17 * script or throw an exception if it cannot be found.
18 */ 18 */
19 String get sdkPath { 19 String get sdkPath {
20 Uri sdkUri = Platform.script.resolve('../../../sdk/'); 20 Uri sdkUri = Platform.script.resolve('../../../sdk/');
21 21
22 // Verify the directory exists 22 // Verify the directory exists
23 Directory sdkDir = new Directory.fromUri(sdkUri); 23 Directory sdkDir = new Directory.fromUri(sdkUri);
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 responsesReceived.add(response); 106 responsesReceived.add(response);
107 // Wrap send response in future to simulate websocket 107 // Wrap send response in future to simulate websocket
108 new Future(() => responseController.add(response)); 108 new Future(() => responseController.add(response));
109 } 109 }
110 110
111 void expectMsgCount({responseCount: 0, notificationCount: 0}) { 111 void expectMsgCount({responseCount: 0, notificationCount: 0}) {
112 expect(responsesReceived, hasLength(responseCount)); 112 expect(responsesReceived, hasLength(responseCount));
113 expect(notificationsReceived, hasLength(notificationCount)); 113 expect(notificationsReceived, hasLength(notificationCount));
114 } 114 }
115 } 115 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/domain_server_test.dart ('k') | pkg/analysis_server/test/protocol_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698