| # | Test case | Description |
| 1 | Refactoring 1.5 - Find Usages |
- Open package "abc".
- Find usages of class "abc.A".
|
| Teardown: | Use Refactor/Undo functionality to get the sources into the original state. Check that it succeeded. |
|
|
| RESULT: | Usages of the "A" should be found. |
|
| 2 | Refactoring 1.5 - Find Usages - Context |
- Open annotation "abc.def.DAnnotType" in the editor and select
X of En in default value of member coord in source text.
- Invoke the context menu and choose "Find Usages".
- Find Usages dialog should contain title: "Finx X of class En":.
- Select Search in Comments checkbox.
- Invoke dialog by Next button.
|
| Teardown: | Use Refactor/Undo functionality to get the sources into the original state. Check that it succeeded. |
|
|
| RESULT: | It should find 4 occurances of En.X constant. |
|
| 3 | Refactoring 1.5 - Rename Class |
- Open class "abc.A" in the editor.
- Find node correspoding to class "abc.A" in the explorer (projects view).
- Invoke the context menu and choose "Refactor/Rename...".
- Change name to "TestClassName".
|
| Teardown: | Use Refactor/Undo functionality to get the sources into the original state. Check that it succeeded. |
|
|
| RESULT: | Verify that the result is correct (the project is compilable and the class was renamed). |
|
| 4 | Refactoring 1.5 - Rename Enumeration |
- Open enumeration "abc.En" in the editor.
- Find node correspoding to enumeration "abc.En" in the explorer (projects view).
- Invoke the context menu and choose "Refactor/Rename...".
- Change name to "TestEnumeration".
|
| Teardown: | Use Refactor/Undo functionality to get the sources into the original state. Check that it succeeded. |
|
|
| RESULT: | Verify that the result is correct (the project is compilable and the enumeration was renamed). |
|
| 5 | Refactoring 1.5 - Rename Enumeration Constant |
- Open enumeration "abc.En" in the editor.
- Find node correspoding to enumeration constant "X" in the explorer (projects view).
- Invoke the context menu and choose "Refactor/Rename...".
- Change name to "W" and select Preview All Changes and Apply Rename in Comments checkboxes.
- Confirm dialog by Next button.
|
| Teardown: | Use Refactor/Undo functionality to get the sources into the original state. Check that it succeeded. |
|
|
| RESULT: | It should find 5 occurances of the constant. |
|
| 6 | Refactoring 1.5 - Rename Field |
- Open class "abc.A" in the editor.
- Find node correspoding to field "abc.A.list" in the explorer (projects view).
- Invoke the context menu and choose "Refactor/Rename...".
- Change name to "testFieldName".
|
| Teardown: | Use Refactor/Undo functionality to get the sources into the original state. Check that it succeeded. |
|
|
| RESULT: | Verify that the result is correct (the project is compilable and the field was renamed). |
|
| 7 | Refactoring 1.5 - Rename Annotation Type |
- Open annotation "abc.def.DAnnotType" in the editor and select
DAnnotType in source text.
- Invoke the context menu and choose "Refactor/Rename...".
- Change name to "AnnotType" and check Preview All Changes checkbox.
- Invoke dialog by Next button.
|
| Teardown: | Use Refactor/Undo functionality to get the sources into the original state. Check that it succeeded. |
|
|
| RESULT: | It should find 16 occurances of the annotation type. |
|
| 8 | Refactoring 1.5 - Rename Annotation Type Member |
- Open annotation "abc.def.DAnnotType" in the editor and select
coord member in source text.
- Invoke the context menu and choose "Refactor/Rename...".
- Change name to "dcoord" and check Preview All Changes checkbox.
- Invoke dialog by Next button.
|
| Teardown: | Use Refactor/Undo functionality to get the sources into the original state. Check that it succeeded. |
|
|
| RESULT: | It should find 2 occurances of the member of annotation type. |
|
| 9 | Refactoring 1.5 - Move Class I |
- Open class "abc.A" in the editor.
- Find node correspoding to class "abc.A" in the explorer (projects view).
- Invoke the context menu and choose "Refactor/Move Class...".
- Set destination package to "abc.def".
|
| Teardown: | Use Refactor/Undo functionality to get the sources into the original state. Check that it succeeded. |
|
|
| RESULT: | Verify that the result is correct (the project is compilable and the class was moved). |
|
| 10 | Refactoring 1.5 - Move Class II |
- Open enumeration "abc.En" in the editor.
- Find node correspoding to enumeration "abc.En" in the explorer (projects view).
- Invoke the context menu and choose "Refactor/Move Class...".
- Set destination package to "abc.def".
|
| Teardown: | Use Refactor/Undo functionality to get the sources into the original state. Check that it succeeded. |
|
|
| RESULT: | Verify that the result is correct (the project is compilable and the enumeration was moved). |
|
| 11 | Refactoring 1.5 - Encapsulate Fields |
- Open class "abc.A" in the editor.
- Find node correspoding to field "abc.A.list" in the explorer (projects view).
- Invoke the context menu and choose "Refactor/Encapsulate Fields...".
- Leave the default values in the dialog untouched (encapsulate only "list", field visibility "private", accessor visibility "public", use accesors even if field is visible "true".
|
| Teardown: | Use Refactor/Undo functionality to get the sources into the original state. Check that it succeeded. |
|
|
| RESULT: | Verify that the result is correct (all occurrences of "list" in "abc.A" and "abc.B" should be replaced, the generated methods should have generics types). |
|
| 12 | Refactoring 1.5 - Change Signature |
- Open class "abc.A" in the editor.
- Find node correspoding to "abc.A.methodA(T, String, boolean, String...)" in the explorer (projects view).
- Invoke the context menu and choose "Refactor/Change Method Parameters...".
- Make some changes.
|
| Teardown: | Use Refactor/Undo functionality to get the sources into the original state. Check that it succeeded. |
|
|
| RESULT: | Verify that the result is correct. |
|
| See #44509, #44524, #44528. |
|
During performing this test suite take ideas from the rest of the refactoring test suite.