| 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 test.operation.queue; | 5 library test.operation.queue; |
| 6 | 6 |
| 7 import 'package:analysis_server/src/analysis_server.dart'; | 7 import 'package:analysis_server/src/analysis_server.dart'; |
| 8 import 'package:analysis_server/src/operation/operation.dart'; | 8 import 'package:analysis_server/src/operation/operation.dart'; |
| 9 import 'package:analysis_server/src/operation/operation_analysis.dart'; | 9 import 'package:analysis_server/src/operation/operation_analysis.dart'; |
| 10 import 'package:analysis_server/src/operation/operation_queue.dart'; | 10 import 'package:analysis_server/src/operation/operation_queue.dart'; |
| 11 import 'package:analysis_server/src/services/search/search_engine.dart'; | 11 import 'package:analysis_server/src/services/search/search_engine.dart'; |
| 12 import 'package:analyzer/file_system/file_system.dart'; |
| 12 import 'package:analyzer/src/generated/engine.dart'; | 13 import 'package:analyzer/src/generated/engine.dart'; |
| 13 import 'package:analyzer/src/generated/source.dart'; | 14 import 'package:analyzer/src/generated/source.dart'; |
| 14 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 15 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
| 15 import 'package:typed_mock/typed_mock.dart'; | 16 import 'package:typed_mock/typed_mock.dart'; |
| 16 import 'package:unittest/unittest.dart'; | 17 import 'package:unittest/unittest.dart'; |
| 17 | 18 |
| 18 import '../mocks.dart'; | 19 import '../mocks.dart'; |
| 19 | 20 |
| 20 main() { | 21 main() { |
| 21 groupSep = ' | '; | 22 groupSep = ' | '; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 33 | 34 |
| 34 class AnalysisContextMock extends TypedMock implements InternalAnalysisContext { | 35 class AnalysisContextMock extends TypedMock implements InternalAnalysisContext { |
| 35 List<Source> prioritySources = <Source>[]; | 36 List<Source> prioritySources = <Source>[]; |
| 36 | 37 |
| 37 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); | 38 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); |
| 38 } | 39 } |
| 39 | 40 |
| 40 class AnalysisServerMock extends TypedMock implements AnalysisServer { | 41 class AnalysisServerMock extends TypedMock implements AnalysisServer { |
| 41 | 42 |
| 42 @override | 43 @override |
| 44 final ResourceProvider resourceProvider; |
| 45 |
| 46 @override |
| 43 final SearchEngine searchEngine; | 47 final SearchEngine searchEngine; |
| 44 | 48 |
| 45 AnalysisServerMock({this.searchEngine}); | 49 AnalysisServerMock({this.resourceProvider, this.searchEngine}); |
| 46 | 50 |
| 47 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); | 51 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); |
| 48 } | 52 } |
| 49 | 53 |
| 50 class ServerContextManagerMock extends TypedMock | 54 class ServerContextManagerMock extends TypedMock |
| 51 implements ServerContextManager { | 55 implements ServerContextManager { |
| 52 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); | 56 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); |
| 53 } | 57 } |
| 54 | 58 |
| 55 @reflectiveTest | 59 @reflectiveTest |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 return ServerOperationPriority.ANALYSIS_NOTIFICATION; | 205 return ServerOperationPriority.ANALYSIS_NOTIFICATION; |
| 202 } | 206 } |
| 203 | 207 |
| 204 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); | 208 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); |
| 205 | 209 |
| 206 @override | 210 @override |
| 207 bool shouldBeDiscardedOnSourceChange(Source source) { | 211 bool shouldBeDiscardedOnSourceChange(Source source) { |
| 208 return source == this.source; | 212 return source == this.source; |
| 209 } | 213 } |
| 210 } | 214 } |
| OLD | NEW |