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

Unified Diff: pkg/analysis_server/test/services/refactoring/abstract_refactoring.dart

Issue 516673002: Tweaks for refactoring tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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
Index: pkg/analysis_server/test/services/refactoring/abstract_refactoring.dart
diff --git a/pkg/analysis_server/test/services/refactoring/abstract_refactoring.dart b/pkg/analysis_server/test/services/refactoring/abstract_refactoring.dart
index 21141442c118162d2623e1bcf5d5a2901ee7a668..2b91a080c85bf2d5ff708b031fb7206dc6bd06ab 100644
--- a/pkg/analysis_server/test/services/refactoring/abstract_refactoring.dart
+++ b/pkg/analysis_server/test/services/refactoring/abstract_refactoring.dart
@@ -99,6 +99,19 @@ abstract class RefactoringTest extends AbstractSingleUnitTest {
}
/**
+ * Checks that all conditions are OK and the result of applying the [Change]
+ * to [testUnit] is [expectedCode].
+ */
+ Future assertSuccessfulRefactoring(String expectedCode) {
+ return assertRefactoringConditionsOK().then((_) {
+ return refactoring.createChange().then((SourceChange refactoringChange) {
+ this.refactoringChange = refactoringChange;
+ assertTestChangeResult(expectedCode);
+ });
+ });
+ }
+
+ /**
* Asserts that [refactoringChange] contains a [FileEdit] for [testFile], and
* it results the [expectedCode].
*/

Powered by Google App Engine
This is Rietveld 408576698