26

I would like to customize the JUnit Test class template however I cannot find it anywhere in settings. This guy has the same problem. I can't find anything in File Templates or Live Templates. I'm using Intellij 11.

shmish111
  • 3,697
  • 5
  • 30
  • 52

2 Answers2

41

This is now solved in the latest IntelliJ IDEA / Android Studio. Go to:

Settings
-Editor
-File and Code Templates
-Code (tab)
-JUnit4 Test Class 

edit the code in the right window.

Image of the dialog from above description

Nilzor
  • 18,082
  • 22
  • 100
  • 167
1

The link provided by CrazyCoder suggests that this is not directly possible but that I you need to add if statements to the Class File Type template. I will probably split the template in two using a big if-else.

shmish111
  • 3,697
  • 5
  • 30
  • 52