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.services.refactoring.naming_conventions; | 5 library test.services.refactoring.naming_conventions; |
6 | 6 |
7 import 'package:analysis_server/src/protocol.dart' show | 7 import 'package:analysis_server/src/protocol.dart' show |
8 RefactoringProblemSeverity; | 8 RefactoringProblemSeverity; |
9 import 'package:analysis_server/src/services/refactoring/naming_conventions.dart
'; | 9 import 'package:analysis_server/src/services/refactoring/naming_conventions.dart
'; |
10 import 'package:analysis_server/src/services/refactoring/refactoring.dart'; | 10 import 'package:analysis_server/src/services/refactoring/refactoring.dart'; |
11 import 'package:unittest/unittest.dart'; | 11 import 'package:unittest/unittest.dart'; |
12 | 12 |
13 import '../../reflective_tests.dart'; | 13 import '../../reflective_tests.dart'; |
14 import 'abstract_refactoring.dart'; | 14 import 'abstract_refactoring.dart'; |
15 | 15 |
16 | 16 |
17 main() { | 17 main() { |
18 groupSep = ' | '; | 18 groupSep = ' | '; |
19 runReflectiveTests(NamingConventionsTest); | 19 runReflectiveTests(NamingConventionsTest); |
20 } | 20 } |
21 | 21 |
22 | 22 |
23 @ReflectiveTestCase() | 23 @reflectiveTest |
24 class NamingConventionsTest extends RefactoringTest { | 24 class NamingConventionsTest extends RefactoringTest { |
25 @override | 25 @override |
26 Refactoring get refactoring => null; | 26 Refactoring get refactoring => null; |
27 | 27 |
28 void test_validateClassName_doesNotStartWithLowerCase() { | 28 void test_validateClassName_doesNotStartWithLowerCase() { |
29 assertRefactoringStatus( | 29 assertRefactoringStatus( |
30 validateClassName("newName"), | 30 validateClassName("newName"), |
31 RefactoringProblemSeverity.WARNING, | 31 RefactoringProblemSeverity.WARNING, |
32 expectedMessage: "Class name should start with an uppercase letter."); | 32 expectedMessage: "Class name should start with an uppercase letter."); |
33 } | 33 } |
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
721 assertRefactoringStatusOK(validateVariableName("new_name")); | 721 assertRefactoringStatusOK(validateVariableName("new_name")); |
722 } | 722 } |
723 | 723 |
724 void test_validateVariableName_trailingBlanks() { | 724 void test_validateVariableName_trailingBlanks() { |
725 assertRefactoringStatus( | 725 assertRefactoringStatus( |
726 validateVariableName("newName "), | 726 validateVariableName("newName "), |
727 RefactoringProblemSeverity.FATAL, | 727 RefactoringProblemSeverity.FATAL, |
728 expectedMessage: "Variable name must not start or end with a blank."); | 728 expectedMessage: "Variable name must not start or end with a blank."); |
729 } | 729 } |
730 } | 730 } |
OLD | NEW |