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

Unified Diff: pkg/analysis_server/test/src/plugin/request_converter_test.dart

Issue 2834993002: Add support for three more plugin requests (Closed)
Patch Set: Created 3 years, 8 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/domain_analysis_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/src/plugin/request_converter_test.dart
diff --git a/pkg/analysis_server/test/src/plugin/request_converter_test.dart b/pkg/analysis_server/test/src/plugin/request_converter_test.dart
index b923c9e7b0ec6a4b51bd85c0b45a2c6bd935c255..c8e47e80dab5d17fea29ded14f9f978ad7ccd56b 100644
--- a/pkg/analysis_server/test/src/plugin/request_converter_test.dart
+++ b/pkg/analysis_server/test/src/plugin/request_converter_test.dart
@@ -36,6 +36,49 @@ class RequestConverterTest extends ProtocolTestUtilities {
});
}
+ void test_convertAnalysisSetPriorityFilesParams() {
+ List<String> files = <String>['a', 'b', 'c'];
+ plugin.AnalysisSetPriorityFilesParams result =
+ converter.convertAnalysisSetPriorityFilesParams(
+ new server.AnalysisSetPriorityFilesParams(files));
+ expect(result, isNotNull);
+ expect(result.files, files);
+ }
+
+ void test_convertAnalysisSetSubscriptionsParams() {
+ Map<server.AnalysisService, List<String>> serverSubscriptions =
+ <server.AnalysisService, List<String>>{
+ server.AnalysisService.HIGHLIGHTS: <String>['a', 'b'],
+ server.AnalysisService.OUTLINE: <String>['c'],
+ server.AnalysisService.OVERRIDES: <String>['d', 'e']
+ };
+ plugin.AnalysisSetSubscriptionsParams result =
+ converter.convertAnalysisSetSubscriptionsParams(
+ new server.AnalysisSetSubscriptionsParams(serverSubscriptions));
+ expect(result, isNotNull);
+ Map<plugin.AnalysisService, List<String>> pluginSubscriptions =
+ result.subscriptions;
+ expect(pluginSubscriptions, hasLength(2));
+ expect(
+ pluginSubscriptions[plugin.AnalysisService.HIGHLIGHTS], hasLength(2));
+ expect(pluginSubscriptions[plugin.AnalysisService.OUTLINE], hasLength(1));
+ }
+
+ void test_convertAnalysisUpdateContentParams() {
+ Map<String, dynamic> serverFiles = <String, dynamic>{
+ 'file1': new server.AddContentOverlay('content1'),
+ 'file2': new server.AddContentOverlay('content2'),
+ };
+ plugin.AnalysisUpdateContentParams result =
+ converter.convertAnalysisUpdateContentParams(
+ new server.AnalysisUpdateContentParams(serverFiles));
+ expect(result, isNotNull);
+ Map<String, dynamic> pluginFiles = result.files;
+ expect(pluginFiles, hasLength(2));
+ expect(pluginFiles['file1'], new isInstanceOf<plugin.AddContentOverlay>());
+ expect(pluginFiles['file2'], new isInstanceOf<plugin.AddContentOverlay>());
+ }
+
void test_convertFileOverlay_add() {
String content = 'content';
plugin.AddContentOverlay result =
« no previous file with comments | « pkg/analysis_server/test/domain_analysis_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698