| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013, the Dart project authors. | 2 * Copyright (c) 2013, the Dart project authors. |
| 3 * | 3 * |
| 4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except | 4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except |
| 5 * in compliance with the License. You may obtain a copy of the License at | 5 * in compliance with the License. You may obtain a copy of the License at |
| 6 * | 6 * |
| 7 * http://www.eclipse.org/legal/epl-v10.html | 7 * http://www.eclipse.org/legal/epl-v10.html |
| 8 * | 8 * |
| 9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License | 9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License |
| 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express | 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 /** | 307 /** |
| 308 * Checks that all conditions are <code>OK</code> and applying {@link Change}
to the | 308 * Checks that all conditions are <code>OK</code> and applying {@link Change}
to the |
| 309 * {@link #testUnit} is same source as given lines. | 309 * {@link #testUnit} is same source as given lines. |
| 310 */ | 310 */ |
| 311 protected final void assertSuccessfulRefactoring(String... lines) throws Excep
tion { | 311 protected final void assertSuccessfulRefactoring(String... lines) throws Excep
tion { |
| 312 assertRefactoringStatusOK(refactoringStatus); | 312 assertRefactoringStatusOK(refactoringStatus); |
| 313 Change change = refactoring.createChange(pm); | 313 Change change = refactoring.createChange(pm); |
| 314 assertTestChangeResult(change, makeSource(lines)); | 314 assertTestChangeResult(change, makeSource(lines)); |
| 315 } | 315 } |
| 316 | 316 |
| 317 @Override |
| 318 protected void tearDown() throws Exception { |
| 319 refactoring = null; |
| 320 refactoringStatus = null; |
| 321 super.tearDown(); |
| 322 } |
| 323 |
| 317 private void assert_fatalError_selection() { | 324 private void assert_fatalError_selection() { |
| 318 assertRefactoringStatus( | 325 assertRefactoringStatus( |
| 319 refactoringStatus, | 326 refactoringStatus, |
| 320 RefactoringStatusSeverity.FATAL, | 327 RefactoringStatusSeverity.FATAL, |
| 321 "Local variable declaration or reference must be selected to activate th
is refactoring."); | 328 "Local variable declaration or reference must be selected to activate th
is refactoring."); |
| 322 } | 329 } |
| 323 | 330 |
| 324 /** | 331 /** |
| 325 * Creates {@link ExtractLocalRefactoring} in {@link #refactoring}. | 332 * Creates {@link ExtractLocalRefactoring} in {@link #refactoring}. |
| 326 */ | 333 */ |
| (...skipping 12 matching lines...) Expand all Loading... |
| 339 } | 346 } |
| 340 | 347 |
| 341 /** | 348 /** |
| 342 * Prints result of {@link #refactoring} in the way ready to parse into test e
xpectations. | 349 * Prints result of {@link #refactoring} in the way ready to parse into test e
xpectations. |
| 343 */ | 350 */ |
| 344 @SuppressWarnings("unused") | 351 @SuppressWarnings("unused") |
| 345 private void printRefactoringResultSource() throws Exception { | 352 private void printRefactoringResultSource() throws Exception { |
| 346 printRefactoringTestSourceResult(getAnalysisContext(), refactoring); | 353 printRefactoringTestSourceResult(getAnalysisContext(), refactoring); |
| 347 } | 354 } |
| 348 } | 355 } |
| OLD | NEW |