| OLD | NEW |
| 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 @MirrorsUsed(targets: 'mocks', override: '*') | 7 @MirrorsUsed(targets: 'mocks', override: '*') |
| 8 import 'dart:mirrors'; | 8 import 'dart:mirrors'; |
| 9 import 'dart:async'; | 9 import 'dart:async'; |
| 10 import 'dart:io'; | 10 import 'dart:io'; |
| 11 | 11 |
| 12 import 'package:analysis_server/src/analysis_server.dart'; | 12 import 'package:analysis_server/src/analysis_server.dart'; |
| 13 import 'package:analysis_server/src/channel/channel.dart'; | 13 import 'package:analysis_server/src/channel/channel.dart'; |
| 14 import 'package:analysis_server/src/operation/operation.dart'; | 14 import 'package:analysis_server/src/operation/operation.dart'; |
| 15 import 'package:analysis_server/src/operation/operation_analysis.dart'; | 15 import 'package:analysis_server/src/operation/operation_analysis.dart'; |
| 16 import 'package:analysis_server/src/protocol.dart' hide Element, ElementKind; | 16 import 'package:analysis_server/src/protocol.dart' hide Element, ElementKind; |
| 17 import 'package:analysis_server/src/services/index/index.dart'; | |
| 18 import 'package:analyzer/file_system/file_system.dart' as resource; | 17 import 'package:analyzer/file_system/file_system.dart' as resource; |
| 19 import 'package:analyzer/file_system/memory_file_system.dart' as resource; | 18 import 'package:analyzer/file_system/memory_file_system.dart' as resource; |
| 20 import 'package:analyzer/source/package_map_provider.dart'; | 19 import 'package:analyzer/source/package_map_provider.dart'; |
| 21 import 'package:analyzer/src/generated/element.dart'; | 20 import 'package:analyzer/src/generated/element.dart'; |
| 22 import 'package:analyzer/src/generated/engine.dart'; | 21 import 'package:analyzer/src/generated/engine.dart'; |
| 23 import 'package:analyzer/src/generated/source.dart'; | 22 import 'package:analyzer/src/generated/source.dart'; |
| 24 import 'package:matcher/matcher.dart'; | 23 import 'package:matcher/matcher.dart'; |
| 25 import 'package:typed_mock/typed_mock.dart'; | 24 import 'package:typed_mock/typed_mock.dart'; |
| 26 import 'package:unittest/unittest.dart'; | 25 import 'package:unittest/unittest.dart'; |
| 27 | 26 |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 bool get isContinue => false; | 323 bool get isContinue => false; |
| 325 | 324 |
| 326 @override | 325 @override |
| 327 void perform(AnalysisServer server) => this._perform(server); | 326 void perform(AnalysisServer server) => this._perform(server); |
| 328 | 327 |
| 329 @override | 328 @override |
| 330 void sendNotices(AnalysisServer server, List<ChangeNotice> notices) { | 329 void sendNotices(AnalysisServer server, List<ChangeNotice> notices) { |
| 331 } | 330 } |
| 332 | 331 |
| 333 @override | 332 @override |
| 334 void updateIndex(Index index, List<ChangeNotice> notices) { | 333 void updateIndex(AnalysisServer server, List<ChangeNotice> notices) { |
| 335 } | 334 } |
| 336 } | 335 } |
| 337 | 336 |
| 338 | 337 |
| 339 /** | 338 /** |
| 340 * A mock [WebSocket] for testing. | 339 * A mock [WebSocket] for testing. |
| 341 */ | 340 */ |
| 342 class MockSocket<T> implements WebSocket { | 341 class MockSocket<T> implements WebSocket { |
| 343 StreamController controller = new StreamController(); | 342 StreamController controller = new StreamController(); |
| 344 MockSocket twin; | 343 MockSocket twin; |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 } | 506 } |
| 508 return mismatchDescription; | 507 return mismatchDescription; |
| 509 } | 508 } |
| 510 | 509 |
| 511 @override | 510 @override |
| 512 bool matches(item, Map matchState) { | 511 bool matches(item, Map matchState) { |
| 513 Response response = item; | 512 Response response = item; |
| 514 return response != null && response.id == _id && response.error == null; | 513 return response != null && response.id == _id && response.error == null; |
| 515 } | 514 } |
| 516 } | 515 } |
| OLD | NEW |