| 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/src/analysis_server.dart'; | 9 import 'package:analysis_server/src/analysis_server.dart'; |
| 10 import 'package:analysis_server/src/constants.dart'; | 10 import 'package:analysis_server/src/constants.dart'; |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 when(context.librarySources).thenReturn([source4]); | 223 when(context.librarySources).thenReturn([source4]); |
| 224 when(context.htmlSources).thenReturn([source5]); | 224 when(context.htmlSources).thenReturn([source5]); |
| 225 when(context.getLibrariesReferencedFromHtml(anyObject)) | 225 when(context.getLibrariesReferencedFromHtml(anyObject)) |
| 226 .thenReturn([source6, source7]); | 226 .thenReturn([source6, source7]); |
| 227 | 227 |
| 228 ServerContextManager manager = new ServerContextManagerMock(); | 228 ServerContextManager manager = new ServerContextManagerMock(); |
| 229 when(manager.isInAnalysisRoot(anyString)).thenReturn(true); | 229 when(manager.isInAnalysisRoot(anyString)).thenReturn(true); |
| 230 | 230 |
| 231 AnalysisServer server = new AnalysisServerMock(); | 231 AnalysisServer server = new AnalysisServerMock(); |
| 232 when(server.getAnalysisContexts()).thenReturn([context]); | 232 when(server.getAnalysisContexts()).thenReturn([context]); |
| 233 when(server.contextDirectoryManager).thenReturn(manager); | 233 when(server.contextManager).thenReturn(manager); |
| 234 | 234 |
| 235 StreamController controller = new StreamController.broadcast(sync: true); | 235 StreamController controller = new StreamController.broadcast(sync: true); |
| 236 when(server.onFileAnalyzed).thenReturn(controller.stream); | 236 when(server.onFileAnalyzed).thenReturn(controller.stream); |
| 237 | 237 |
| 238 List<String> unsentNotifications = <String>[ | 238 List<String> unsentNotifications = <String>[ |
| 239 source1.fullName, | 239 source1.fullName, |
| 240 source2.fullName, | 240 source2.fullName, |
| 241 source3.fullName, | 241 source3.fullName, |
| 242 source4.fullName, | 242 source4.fullName, |
| 243 source5.fullName | 243 source5.fullName |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 * A [Source] that knows it's [fullName]. | 315 * A [Source] that knows it's [fullName]. |
| 316 */ | 316 */ |
| 317 class TestSource implements Source { | 317 class TestSource implements Source { |
| 318 String fullName; | 318 String fullName; |
| 319 | 319 |
| 320 TestSource(this.fullName); | 320 TestSource(this.fullName); |
| 321 | 321 |
| 322 @override | 322 @override |
| 323 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); | 323 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); |
| 324 } | 324 } |
| OLD | NEW |