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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 /** | 276 /** |
277 * Checks that all conditions are <code>OK</code> and applying {@link Change}
to the | 277 * Checks that all conditions are <code>OK</code> and applying {@link Change}
to the |
278 * {@link #testUnit} is same source as given lines. | 278 * {@link #testUnit} is same source as given lines. |
279 */ | 279 */ |
280 protected final void assertSuccessfulRefactoring(String... lines) throws Excep
tion { | 280 protected final void assertSuccessfulRefactoring(String... lines) throws Excep
tion { |
281 assertRefactoringStatusOK(refactoringStatus); | 281 assertRefactoringStatusOK(refactoringStatus); |
282 refactoringChange = refactoring.createChange(pm); | 282 refactoringChange = refactoring.createChange(pm); |
283 assertTestChangeResult(refactoringChange, makeSource(lines)); | 283 assertTestChangeResult(refactoringChange, makeSource(lines)); |
284 } | 284 } |
285 | 285 |
| 286 @Override |
| 287 protected void tearDown() throws Exception { |
| 288 selectionElement = null; |
| 289 refactoring = null; |
| 290 refactoringStatus = null; |
| 291 refactoringChange = null; |
| 292 super.tearDown(); |
| 293 } |
| 294 |
286 /** | 295 /** |
287 * Creates {@link ConvertMethodToGetterRefactoring} in {@link #refactoring}. | 296 * Creates {@link ConvertMethodToGetterRefactoring} in {@link #refactoring}. |
288 */ | 297 */ |
289 private void createRefactoring() throws Exception { | 298 private void createRefactoring() throws Exception { |
290 refactoring = new ConvertMethodToGetterRefactoringImpl(searchEngine, selecti
onElement); | 299 refactoring = new ConvertMethodToGetterRefactoringImpl(searchEngine, selecti
onElement); |
291 // prepare status | 300 // prepare status |
292 refactoringStatus = refactoring.checkAllConditions(pm); | 301 refactoringStatus = refactoring.checkAllConditions(pm); |
293 } | 302 } |
294 } | 303 } |
OLD | NEW |