| 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 library test.domain.analysis.notification.outline; | 5 library test.domain.analysis.notification.outline; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:mirrors'; | 8 import 'dart:mirrors'; |
| 9 | 9 |
| 10 import 'package:analysis_server/src/analysis_server.dart'; | 10 import 'package:analysis_server/src/analysis_server.dart'; |
| 11 import 'package:analysis_server/src/constants.dart'; | 11 import 'package:analysis_server/src/constants.dart'; |
| 12 import 'package:analysis_server/src/protocol.dart'; | 12 import 'package:analysis_server/src/protocol.dart'; |
| 13 import 'package:unittest/unittest.dart'; | 13 import 'package:unittest/unittest.dart'; |
| 14 | 14 |
| 15 import 'analysis_abstract.dart'; | 15 import 'analysis_abstract.dart'; |
| 16 import 'reflective_tests.dart'; | 16 import 'reflective_tests.dart'; |
| 17 | 17 |
| 18 | 18 |
| 19 main() { | 19 main() { |
| 20 group('notification.outline', () { | 20 group('notification.outline', () { |
| 21 runReflectiveTests(AnalysisNotificationOutlineTest); | 21 runReflectiveTests(AnalysisNotificationOutlineTest); |
| 22 }); | 22 }); |
| 23 } | 23 } |
| 24 | 24 |
| 25 | 25 |
| 26 @ReflectiveTestCase() | 26 @ReflectiveTestCase() |
| 27 class AnalysisNotificationOutlineTest extends AbstractAnalysisTest { | 27 class AnalysisNotificationOutlineTest extends AbstractAnalysisTest { |
| 28 _Outline outline; | 28 _Outline outline; |
| 29 | 29 |
| 30 @override |
| 31 void setUp() { |
| 32 super.setUp(); |
| 33 createProject(); |
| 34 } |
| 35 |
| 30 void processNotification(Notification notification) { | 36 void processNotification(Notification notification) { |
| 31 if (notification.event == ANALYSIS_OUTLINE) { | 37 if (notification.event == ANALYSIS_OUTLINE) { |
| 32 String file = notification.getParameter(FILE); | 38 String file = notification.getParameter(FILE); |
| 33 if (file == testFile) { | 39 if (file == testFile) { |
| 34 Map<String, Object> json = notification.getParameter(OUTLINE); | 40 Map<String, Object> json = notification.getParameter(OUTLINE); |
| 35 outline = new _Outline.fromJson(json); | 41 outline = new _Outline.fromJson(json); |
| 36 } | 42 } |
| 37 } | 43 } |
| 38 } | 44 } |
| 39 | 45 |
| (...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 672 map[PARAMETERS], map[RETURN_TYPE]); | 678 map[PARAMETERS], map[RETURN_TYPE]); |
| 673 List<Map<String, Object>> childrenMaps = map[CHILDREN]; | 679 List<Map<String, Object>> childrenMaps = map[CHILDREN]; |
| 674 if (childrenMaps != null) { | 680 if (childrenMaps != null) { |
| 675 childrenMaps.forEach((childMap) { | 681 childrenMaps.forEach((childMap) { |
| 676 outline.children.add(new _Outline.fromJson(childMap)); | 682 outline.children.add(new _Outline.fromJson(childMap)); |
| 677 }); | 683 }); |
| 678 } | 684 } |
| 679 return outline; | 685 return outline; |
| 680 } | 686 } |
| 681 } | 687 } |
| OLD | NEW |