Bug 11851 generated new TestCase differes form generated new class
It would be nice if the generation of a new test case would do the same as generation of a new class. The thing which I noticed: new Class wizards adds javadoc while new Test Case wizard does not. /** * Constructor for AA. * @param name */ public AA(String name) { super(name); }
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
}
			main.append(".TestRunner.run(" + getTypeName() + ".class);"); 
		}
		main.append("}\n"); 
		type.createMethod(main.toString(), null, false, null);	
		fIndexOfFirstTestMethod++;		
	}
	protected void createSetUp(IType type, IImportsStructure imports) throws JavaModelException {
		ITypeHierarchy typeHierarchy= null;
		IType[] superTypes= null;
		String setUp;
		IMethod methodTemplate= null;
		if (type.exists()) {
			typeHierarchy= type.newSupertypeHierarchy(null);
			superTypes= typeHierarchy.getAllSuperclasses(type);
			for (int i= 0; i < superTypes.length; i++) {
				if (superTypes[i].exists()) {
					IMethod testMethod= superTypes[i].getMethod(SETUP, new String[] {});
					if (testMethod.exists()) {
						methodTemplate= testMethod;
						break;
					}
				}
			}
		}
		if (methodTemplate != null) {
			CodeGenerationSettings settings= JavaPreferencesSettings.getCodeGenerationSettings();
			GenStubSettings genStubSettings= new GenStubSettings(settings);
			genStubSettings.fCallSuper= true;				
			genStubSettings.fMethodOverwrites= true;