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
setUp= JUnitStubUtility.genStub(getTypeName(), methodTemplate, genStubSettings, imports);
		} else {
			setUp="/**\n * Sets up the fixture, for example, open a network connection.\n * This method is called before a test is executed.\n * @throws Exception\n */\n" + 
				"protected void "+SETUP+"() throws Exception {}\n\n"; 
		}
		type.createMethod(setUp, null, false, null);	
		fIndexOfFirstTestMethod++;
	}
	
	protected void createTearDown(IType type, IImportsStructure imports) throws JavaModelException {
		ITypeHierarchy typeHierarchy= null;
		IType[] superTypes= null;
		String tearDown;
		IMethod methodTemplate= null;
		if (type.exists()) {
			if (typeHierarchy == null) {
				typeHierarchy= type.newSupertypeHierarchy(null);
				superTypes= typeHierarchy.getAllSuperclasses(type);
			}
			for (int i= 0; i < superTypes.length; i++) {
				if (superTypes[i].exists()) {
					IMethod testM= superTypes[i].getMethod(TEARDOWN, new String[] {});
					if (testM.exists()) {
						methodTemplate= testM;
						break;
					}
				}
			}
		}
		if (methodTemplate != null) {