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

Side by Side Diff: pkg/analysis_server/test/services/refactoring/rename_library_test.dart

Issue 545943003: Include additional information into RenameFeedback. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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.rename_library; 5 library test.services.refactoring.rename_library;
6 6
7 import 'package:analysis_server/src/protocol.dart'; 7 import 'package:analysis_server/src/protocol.dart';
8 import '../../reflective_tests.dart'; 8 import '../../reflective_tests.dart';
9 import 'package:analyzer/src/generated/source.dart'; 9 import 'package:analyzer/src/generated/source.dart';
10 import 'package:unittest/unittest.dart'; 10 import 'package:unittest/unittest.dart';
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 indexTestUnit(''' 53 indexTestUnit('''
54 library my.app; 54 library my.app;
55 part 'part.dart'; 55 part 'part.dart';
56 '''); 56 ''');
57 index.indexUnit( 57 index.indexUnit(
58 context, 58 context,
59 context.resolveCompilationUnit2(unitSource, testSource)); 59 context.resolveCompilationUnit2(unitSource, testSource));
60 // configure refactoring 60 // configure refactoring
61 _createRenameRefactoring(); 61 _createRenameRefactoring();
62 expect(refactoring.refactoringName, 'Rename Library'); 62 expect(refactoring.refactoringName, 'Rename Library');
63 expect(refactoring.elementKindName, 'library');
63 refactoring.newName = 'the.new.name'; 64 refactoring.newName = 'the.new.name';
64 // validate change 65 // validate change
65 return assertSuccessfulRefactoring(''' 66 return assertSuccessfulRefactoring('''
66 library the.new.name; 67 library the.new.name;
67 part 'part.dart'; 68 part 'part.dart';
68 ''').then((_) { 69 ''').then((_) {
69 assertFileChangeResult('/part.dart', ''' 70 assertFileChangeResult('/part.dart', '''
70 part of the.new.name; 71 part of the.new.name;
71 '''); 72 ''');
72 }); 73 });
73 } 74 }
74 75
75 void _createRenameRefactoring() { 76 void _createRenameRefactoring() {
76 createRenameRefactoringForElement(testUnitElement.library); 77 createRenameRefactoringForElement(testUnitElement.library);
77 } 78 }
78 } 79 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698