| 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 /** | 226 /** |
| 227 * Checks that all conditions are <code>OK</code> and applying {@link Change}
to the | 227 * Checks that all conditions are <code>OK</code> and applying {@link Change}
to the |
| 228 * {@link #testUnit} is same source as given lines. | 228 * {@link #testUnit} is same source as given lines. |
| 229 */ | 229 */ |
| 230 protected final void assertSuccessfulRefactoring(String... lines) throws Excep
tion { | 230 protected final void assertSuccessfulRefactoring(String... lines) throws Excep
tion { |
| 231 assertRefactoringStatusOK(refactoringStatus); | 231 assertRefactoringStatusOK(refactoringStatus); |
| 232 refactoringChange = refactoring.createChange(pm); | 232 refactoringChange = refactoring.createChange(pm); |
| 233 assertTestChangeResult(refactoringChange, makeSource(lines)); | 233 assertTestChangeResult(refactoringChange, makeSource(lines)); |
| 234 } | 234 } |
| 235 | 235 |
| 236 @Override |
| 237 protected void tearDown() throws Exception { |
| 238 selectionElement = null; |
| 239 refactoring = null; |
| 240 refactoringStatus = null; |
| 241 refactoringChange = null; |
| 242 super.tearDown(); |
| 243 } |
| 244 |
| 236 /** | 245 /** |
| 237 * Creates {@link ConvertGetterToMethodRefactoring} in {@link #refactoring}. | 246 * Creates {@link ConvertGetterToMethodRefactoring} in {@link #refactoring}. |
| 238 */ | 247 */ |
| 239 private void createRefactoring() throws Exception { | 248 private void createRefactoring() throws Exception { |
| 240 refactoring = new ConvertGetterToMethodRefactoringImpl(searchEngine, selecti
onElement); | 249 refactoring = new ConvertGetterToMethodRefactoringImpl(searchEngine, selecti
onElement); |
| 241 // prepare status | 250 // prepare status |
| 242 refactoringStatus = refactoring.checkAllConditions(pm); | 251 refactoringStatus = refactoring.checkAllConditions(pm); |
| 243 } | 252 } |
| 244 } | 253 } |
| OLD | NEW |