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 import 'package:analysis_server/protocol/protocol.dart'; | 5 import 'package:analysis_server/protocol/protocol.dart'; |
6 import 'package:analysis_server/protocol/protocol_constants.dart'; | 6 import 'package:analysis_server/protocol/protocol_constants.dart'; |
7 import 'package:analysis_server/protocol/protocol_generated.dart'; | 7 import 'package:analysis_server/protocol/protocol_generated.dart'; |
8 import 'package:analysis_server/src/analysis_server.dart'; | 8 import 'package:analysis_server/src/analysis_server.dart'; |
9 import 'package:analysis_server/src/constants.dart'; | 9 import 'package:analysis_server/src/constants.dart'; |
10 import 'package:analysis_server/src/domain_server.dart'; | 10 import 'package:analysis_server/src/domain_server.dart'; |
(...skipping 13 matching lines...) Expand all Loading... |
24 setUp(() { | 24 setUp(() { |
25 var serverChannel = new MockServerChannel(); | 25 var serverChannel = new MockServerChannel(); |
26 var resourceProvider = new MemoryResourceProvider(); | 26 var resourceProvider = new MemoryResourceProvider(); |
27 ExtensionManager manager = new ExtensionManager(); | 27 ExtensionManager manager = new ExtensionManager(); |
28 ServerPlugin serverPlugin = new ServerPlugin(); | 28 ServerPlugin serverPlugin = new ServerPlugin(); |
29 manager.processPlugins([serverPlugin]); | 29 manager.processPlugins([serverPlugin]); |
30 server = new AnalysisServer( | 30 server = new AnalysisServer( |
31 serverChannel, | 31 serverChannel, |
32 resourceProvider, | 32 resourceProvider, |
33 new MockPackageMapProvider(), | 33 new MockPackageMapProvider(), |
34 null, | |
35 serverPlugin, | 34 serverPlugin, |
36 new AnalysisServerOptions(), | 35 new AnalysisServerOptions(), |
37 new DartSdkManager('', false), | 36 new DartSdkManager('', false), |
38 InstrumentationService.NULL_SERVICE); | 37 InstrumentationService.NULL_SERVICE); |
39 handler = new ServerDomainHandler(server); | 38 handler = new ServerDomainHandler(server); |
40 }); | 39 }); |
41 | 40 |
42 group('ServerDomainHandler', () { | 41 group('ServerDomainHandler', () { |
43 test('getVersion', () { | 42 test('getVersion', () { |
44 var request = new ServerGetVersionParams().toRequest('0'); | 43 var request = new ServerGetVersionParams().toRequest('0'); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 expect(server.running, isTrue); | 76 expect(server.running, isTrue); |
78 // send request | 77 // send request |
79 var request = new ServerShutdownParams().toRequest('0'); | 78 var request = new ServerShutdownParams().toRequest('0'); |
80 var response = handler.handleRequest(request); | 79 var response = handler.handleRequest(request); |
81 expect(response, isResponseSuccess('0')); | 80 expect(response, isResponseSuccess('0')); |
82 // server is down | 81 // server is down |
83 expect(server.running, isFalse); | 82 expect(server.running, isFalse); |
84 }); | 83 }); |
85 }); | 84 }); |
86 } | 85 } |
OLD | NEW |