Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Unified Diff: pkg/analysis_server/test/socket_server_test.dart

Issue 308703005: Extract constants into separate libarary. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analysis_server/test/resource_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/socket_server_test.dart
diff --git a/pkg/analysis_server/test/socket_server_test.dart b/pkg/analysis_server/test/socket_server_test.dart
index fbc15121819062314fed0abdca9aa8668983d288..0f9c083914cb56d228f0122a4f32f4164d2f9327 100644
--- a/pkg/analysis_server/test/socket_server_test.dart
+++ b/pkg/analysis_server/test/socket_server_test.dart
@@ -8,8 +8,7 @@ import 'dart:async';
import 'mocks.dart';
-import 'package:analysis_server/src/analysis_server.dart';
-import 'package:analysis_server/src/domain_server.dart';
+import 'package:analysis_server/src/constants.dart';
import 'package:analysis_server/src/protocol.dart';
import 'package:analysis_server/src/socket_server.dart';
import 'package:unittest/unittest.dart';
@@ -29,11 +28,11 @@ class SocketServerTest {
MockServerChannel channel = new MockServerChannel();
server.createAnalysisServer(channel);
channel.expectMsgCount(notificationCount: 1);
- expect(channel.notificationsReceived[0].event, equals(
- AnalysisServer.CONNECTED_NOTIFICATION));
+ expect(channel.notificationsReceived[0].event, NOTIFICATION_CONNECTED);
expect(channel.notificationsReceived[0].params, isEmpty);
- return channel.sendRequest(new Request('0',
- ServerDomainHandler.SHUTDOWN_METHOD)).then((Response response) {
+ return channel.sendRequest(
+ new Request('0', METHOD_SHUTDOWN)
+ ).then((Response response) {
expect(response.id, equals('0'));
expect(response.error, isNull);
channel.expectMsgCount(responseCount: 1, notificationCount: 1);
@@ -45,8 +44,7 @@ class SocketServerTest {
MockServerChannel channel1 = new MockServerChannel();
MockServerChannel channel2 = new MockServerChannel();
server.createAnalysisServer(channel1);
- expect(channel1.notificationsReceived[0].event, equals(
- AnalysisServer.CONNECTED_NOTIFICATION));
+ expect(channel1.notificationsReceived[0].event, NOTIFICATION_CONNECTED);
expect(channel1.notificationsReceived[0].params, isEmpty);
server.createAnalysisServer(channel2);
channel1.expectMsgCount(notificationCount: 1);
@@ -55,8 +53,7 @@ class SocketServerTest {
expect(channel2.responsesReceived[0].error, isNotNull);
expect(channel2.responsesReceived[0].error.code, equals(
RequestError.CODE_SERVER_ALREADY_STARTED));
- channel2.sendRequest(new Request('0', ServerDomainHandler.SHUTDOWN_METHOD)
- ).then((Response response) {
+ channel2.sendRequest(new Request('0', METHOD_SHUTDOWN)).then((Response response) {
expect(response.id, equals('0'));
expect(response.error, isNotNull);
expect(response.error.code, equals(
« no previous file with comments | « pkg/analysis_server/test/resource_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698