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.domain.execution; | 5 library test.domain.execution; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'package:analysis_server/plugin/protocol/protocol.dart'; | 9 import 'package:analysis_server/plugin/protocol/protocol.dart'; |
10 import 'package:analysis_server/src/analysis_server.dart'; | 10 import 'package:analysis_server/src/analysis_server.dart'; |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 .thenReturn([source2, source3]); | 216 .thenReturn([source2, source3]); |
217 when(context.librarySources).thenReturn([source4]); | 217 when(context.librarySources).thenReturn([source4]); |
218 when(context.htmlSources).thenReturn([source5]); | 218 when(context.htmlSources).thenReturn([source5]); |
219 when(context.getLibrariesReferencedFromHtml(anyObject)) | 219 when(context.getLibrariesReferencedFromHtml(anyObject)) |
220 .thenReturn([source6, source7]); | 220 .thenReturn([source6, source7]); |
221 | 221 |
222 ContextManager manager = new ServerContextManagerMock(); | 222 ContextManager manager = new ServerContextManagerMock(); |
223 when(manager.isInAnalysisRoot(anyString)).thenReturn(true); | 223 when(manager.isInAnalysisRoot(anyString)).thenReturn(true); |
224 | 224 |
225 AnalysisServer server = new AnalysisServerMock(); | 225 AnalysisServer server = new AnalysisServerMock(); |
226 when(server.getAnalysisContexts()).thenReturn([context]); | 226 when(server.analysisContexts).thenReturn([context]); |
227 when(server.contextManager).thenReturn(manager); | 227 when(server.contextManager).thenReturn(manager); |
228 | 228 |
229 StreamController controller = new StreamController.broadcast(sync: true); | 229 StreamController controller = new StreamController.broadcast(sync: true); |
230 when(server.onFileAnalyzed).thenReturn(controller.stream); | 230 when(server.onFileAnalyzed).thenReturn(controller.stream); |
231 | 231 |
232 List<String> unsentNotifications = <String>[ | 232 List<String> unsentNotifications = <String>[ |
233 source1.fullName, | 233 source1.fullName, |
234 source2.fullName, | 234 source2.fullName, |
235 source3.fullName, | 235 source3.fullName, |
236 source4.fullName, | 236 source4.fullName, |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 * A [Source] that knows it's [fullName]. | 348 * A [Source] that knows it's [fullName]. |
349 */ | 349 */ |
350 class TestSource implements Source { | 350 class TestSource implements Source { |
351 String fullName; | 351 String fullName; |
352 | 352 |
353 TestSource(this.fullName); | 353 TestSource(this.fullName); |
354 | 354 |
355 @override | 355 @override |
356 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); | 356 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); |
357 } | 357 } |
OLD | NEW |