Dashboard > Public Content > ... > JavaStuff > Using IntelliJ Structural Search And Replace
  Public Content Log In   View a printable version of the current page.  
  Using IntelliJ Structural Search And Replace
Added by James Richardson, last edited by James Richardson on Jul 09, 2008  (view change)
Labels: 
(None)

Upgrading from JUnit 3.7 to 3.8

Recently had to upgrade an entire codebase from 3.7 (very old) to 3.8.1 (quite old) The main annoyance was a contructor that's no longer needed, just gets in the way.

Search Pattern

Variables

TESTCASE = junit.framework.TestCase , replace in type hierarchy = true
constructor = min 0, max unlimited
content = min 0, max unlimited

Replacement Pattern

Removing empty setUp()

Search Pattern

Variables

TESTCASE = junit.framework.TestCase
content = min 0, max unlimited

Replacement Pattern

Tidy Up

Then just need to fix manual calls to constructors of the test classes (shouldn't be many...)

Remove empty constructors

Search Pattern

Variables

content - unlimited
extends - unlimited

Replace Pattern

Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.1 Build:#806 May 06, 2007) - Bug/feature request - Contact Administrators