Index: pkg/analysis_server/test/domain_server_test.dart |
diff --git a/pkg/analysis_server/test/domain_server_test.dart b/pkg/analysis_server/test/domain_server_test.dart |
index d76b376543e2ebe342ed5f685e8246b2f2fcec52..a6d8bb3589dd796ebe14c2ec4ca340fa061d71c5 100644 |
--- a/pkg/analysis_server/test/domain_server_test.dart |
+++ b/pkg/analysis_server/test/domain_server_test.dart |
@@ -16,20 +16,28 @@ import 'package:unittest/unittest.dart'; |
import 'mock_sdk.dart'; |
import 'mocks.dart'; |
+import 'utils.dart'; |
main() { |
AnalysisServer server; |
ServerDomainHandler handler; |
+ initializeTestEnvironment(); |
+ |
setUp(() { |
var serverChannel = new MockServerChannel(); |
var resourceProvider = new MemoryResourceProvider(); |
ExtensionManager manager = new ExtensionManager(); |
ServerPlugin serverPlugin = new ServerPlugin(); |
manager.processPlugins([serverPlugin]); |
- server = new AnalysisServer(serverChannel, resourceProvider, |
- new MockPackageMapProvider(), null, serverPlugin, |
- new AnalysisServerOptions(), new MockSdk(), |
+ server = new AnalysisServer( |
+ serverChannel, |
+ resourceProvider, |
+ new MockPackageMapProvider(), |
+ null, |
+ serverPlugin, |
+ new AnalysisServerOptions(), |
+ new MockSdk(), |
InstrumentationService.NULL_SERVICE); |
handler = new ServerDomainHandler(server); |
}); |
@@ -38,16 +46,19 @@ main() { |
test('getVersion', () { |
var request = new ServerGetVersionParams().toRequest('0'); |
var response = handler.handleRequest(request); |
- expect(response.toJson(), equals({ |
- Response.ID: '0', |
- Response.RESULT: {VERSION: AnalysisServer.VERSION} |
- })); |
+ expect( |
+ response.toJson(), |
+ equals({ |
+ Response.ID: '0', |
+ Response.RESULT: {VERSION: AnalysisServer.VERSION} |
+ })); |
}); |
group('setSubscriptions', () { |
test('invalid service name', () { |
- Request request = new Request( |
- '0', SERVER_SET_SUBSCRIPTIONS, {SUBSCRIPTIONS: ['noSuchService']}); |
+ Request request = new Request('0', SERVER_SET_SUBSCRIPTIONS, { |
+ SUBSCRIPTIONS: ['noSuchService'] |
+ }); |
var response = handler.handleRequest(request); |
expect(response, isResponseFailure('0')); |
}); |