33// BSD-style license that can be found in the LICENSE file.
44
55import 'package:analysis_server/src/cider/rename.dart' ;
6- import 'package:analysis_server/src/services/refactoring/refactoring.dart' ;
76import 'package:analyzer/source/line_info.dart' ;
87import 'package:test/test.dart' ;
98import 'package:test_reflective_loader/test_reflective_loader.dart' ;
@@ -31,8 +30,8 @@ class A {
3130''' );
3231
3332 expect (refactor, isNotNull);
34- expect (refactor! .element.name, 'bar' );
35- expect (refactor.offset, _correctionContext.offset);
33+ expect (refactor! .refactoringElement. element.name, 'bar' );
34+ expect (refactor.refactoringElement. offset, _correctionContext.offset);
3635 }
3736
3837 void test_canRename_function () {
@@ -42,8 +41,8 @@ void ^foo() {
4241''' );
4342
4443 expect (refactor, isNotNull);
45- expect (refactor! .element.name, 'foo' );
46- expect (refactor.offset, _correctionContext.offset);
44+ expect (refactor! .refactoringElement. element.name, 'foo' );
45+ expect (refactor.refactoringElement. offset, _correctionContext.offset);
4746 }
4847
4948 void test_canRename_label () {
@@ -58,8 +57,8 @@ main() {
5857''' );
5958
6059 expect (refactor, isNotNull);
61- expect (refactor! .element.name, 'myLabel' );
62- expect (refactor.offset, _correctionContext.offset);
60+ expect (refactor! .refactoringElement. element.name, 'myLabel' );
61+ expect (refactor.refactoringElement. offset, _correctionContext.offset);
6362 }
6463
6564 void test_canRename_local () {
@@ -70,8 +69,8 @@ void foo() {
7069''' );
7170
7271 expect (refactor, isNotNull);
73- expect (refactor! .element.name, 'a' );
74- expect (refactor.offset, _correctionContext.offset);
72+ expect (refactor! .refactoringElement. element.name, 'a' );
73+ expect (refactor.refactoringElement. offset, _correctionContext.offset);
7574 }
7675
7776 void test_canRename_method () {
@@ -82,8 +81,8 @@ extension E on int {
8281''' );
8382
8483 expect (refactor, isNotNull);
85- expect (refactor! .element.name, 'foo' );
86- expect (refactor.offset, _correctionContext.offset);
84+ expect (refactor! .refactoringElement. element.name, 'foo' );
85+ expect (refactor.refactoringElement. offset, _correctionContext.offset);
8786 }
8887
8988 void test_canRename_operator () {
@@ -104,11 +103,11 @@ void foo(int ^bar) {
104103''' );
105104
106105 expect (refactor, isNotNull);
107- expect (refactor! .element.name, 'bar' );
108- expect (refactor.offset, _correctionContext.offset);
106+ expect (refactor! .refactoringElement. element.name, 'bar' );
107+ expect (refactor.refactoringElement. offset, _correctionContext.offset);
109108 }
110109
111- RenameRefactoringElement ? _compute (String content) {
110+ CanRenameResponse ? _compute (String content) {
112111 _updateFile (content);
113112
114113 return CiderRenameComputer (
0 commit comments