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

Unified Diff: pkg/analysis_server/test/integration/server_domain_int_test.dart

Issue 451483005: Code generate integration test methods for synchronous request/response pairs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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/integration/integration_tests.dart ('k') | pkg/analysis_server/tool/spec/api.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/integration/server_domain_int_test.dart
diff --git a/pkg/analysis_server/test/integration/server_domain_int_test.dart b/pkg/analysis_server/test/integration/server_domain_int_test.dart
index 99856c7b9525f1b13c220f2d47925dae65bb967f..01490aed608cb71d0e0ffc4f1f8e7cb0e49a0ca4 100644
--- a/pkg/analysis_server/test/integration/server_domain_int_test.dart
+++ b/pkg/analysis_server/test/integration/server_domain_int_test.dart
@@ -17,16 +17,13 @@ import 'protocol_matchers.dart';
class ServerDomainIntegrationTest extends AbstractAnalysisServerIntegrationTest
{
test_getVersion() {
- return server.send(SERVER_GET_VERSION, null).then((response) {
- expect(response, isServerGetVersionResult);
- });
+ return sendServerGetVersion();
}
test_shutdown() {
- return server.send(SERVER_SHUTDOWN, null).then((response) {
- expect(response, isNull);
+ return sendServerShutdown().then((_) {
return new Future.delayed(new Duration(seconds: 1)).then((_) {
- server.send(SERVER_GET_VERSION, null).then((_) {
+ sendServerGetVersion().then((_) {
fail('Server still alive after server.shutdown');
});
// Give the server time to respond before terminating the test.
@@ -47,8 +44,7 @@ class ServerDomainIntegrationTest extends AbstractAnalysisServerIntegrationTest
analysisBegun.complete();
}
});
- return server_setSubscriptions([]).then((response) {
- expect(response, isNull);
+ return sendServerSetSubscriptions([]).then((_) {
String pathname = sourcePath('test.dart');
writeFile(pathname, '''
main() {
@@ -59,7 +55,7 @@ main() {
// received.
return analysisBegun.future.then((_) {
expect(statusReceived, isFalse);
- return server_setSubscriptions(['STATUS']).then((_) {
+ return sendServerSetSubscriptions(['STATUS']).then((_) {
// Tickle test.dart just in case analysis has already completed.
writeFile(pathname, '''
main() {
@@ -76,7 +72,7 @@ main() {
test_setSubscriptions_invalidService() {
// TODO(paulberry): verify that if an invalid service is specified, the
// current subscriptions are unchanged.
- return server_setSubscriptions(['bogus']).then((_) {
+ return sendServerSetSubscriptions(['bogus'], checkTypes: false).then((_) {
fail('setSubscriptions should have produced an error');
}, onError: (error) {
// The expected error occurred.
« no previous file with comments | « pkg/analysis_server/test/integration/integration_tests.dart ('k') | pkg/analysis_server/tool/spec/api.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698