Seems when I make "move" refactoring all my junit tests lays on its old place. Often I tests "package" visible classes, so they becomes invisible, if SUT moves to another package.
Do you move tests by hand?
I have 4 options for you:
Go to the "Package" view in the left, select both files, and then hit F6. It should move them both to the right place.
Make the class public temporarily, before you do your refactor, and switch back afterwards.
Try moving the test first. I seem to remember that avoids breaking any of the dependencies.
There is a plugin (I think it's toggleTest or unitTest-- I had both of them installed) that patches the Move Refactor to also bring the test with it. Worked great. Unfortunately it looks like these may not work with the latest IDEA.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With