Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 31095 Details for
Bug 119177
[JUnit] Let JUnit Test Suite wizard detect nested TestCases
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
JUnit Test Suite wizard detect nested test classes patch version 0
JUnitTestSuiteWizard.diff (text/plain), 3.57 KB, created by
Albert Strasheim
on 2005-12-03 14:11:47 EST
(
hide
)
Description:
JUnit Test Suite wizard detect nested test classes patch version 0
Filename:
MIME Type:
Creator:
Albert Strasheim
Created:
2005-12-03 14:11:47 EST
Size:
3.57 KB
patch
obsolete
>diff -ur plugins\Copy of org.eclipse.jdt.junit\src/org/eclipse/jdt/internal/junit/wizards/SuiteClassesContentProvider.java plugins\org.eclipse.jdt.junit\src/org/eclipse/jdt/internal/junit/wizards/SuiteClassesContentProvider.java >--- plugins\Copy of org.eclipse.jdt.junit\src/org/eclipse/jdt/internal/junit/wizards/SuiteClassesContentProvider.java 2005-11-02 16:11:42.000000000 +0200 >+++ plugins\org.eclipse.jdt.junit\src/org/eclipse/jdt/internal/junit/wizards/SuiteClassesContentProvider.java 2005-12-03 21:00:17.376274600 +0200 >@@ -41,8 +41,8 @@ > IType[] types= cu.getTypes(); > for (int j= 0; j < types.length; j++) { > IType type= types[j]; >- if (type.isClass() && ! Flags.isAbstract(type.getFlags()) && TestSearchEngine.isTestImplementor(type)) >- typesArrayList.add(types[j]); >+ List testTypes = searchTypeForTestImplementors(type); >+ typesArrayList.addAll(testTypes); > } > } > return typesArrayList.toArray(); >@@ -52,6 +52,21 @@ > } > } > >+ List searchTypeForTestImplementors(IType type) throws JavaModelException { >+ List testTypes = new ArrayList(); >+ if (type.isClass()) { >+ if (! Flags.isAbstract(type.getFlags()) && TestSearchEngine.isTestImplementor(type)) >+ testTypes.add(type); >+ IType[] memberTypes = type.getTypes(); >+ for ( int i = 0; i < memberTypes.length; i++ ) { >+ IType memberType = memberTypes[i]; >+ if ( Flags.isPublic(memberType.getFlags()) ) >+ testTypes.addAll(searchTypeForTestImplementors(memberTypes[i])); >+ } >+ } >+ return testTypes; >+ } >+ > public void dispose() { > } > >diff -ur plugins\Copy of org.eclipse.jdt.junit\src/org/eclipse/jdt/internal/junit/wizards/UpdateTestSuite.java plugins\org.eclipse.jdt.junit\src/org/eclipse/jdt/internal/junit/wizards/UpdateTestSuite.java >--- plugins\Copy of org.eclipse.jdt.junit\src/org/eclipse/jdt/internal/junit/wizards/UpdateTestSuite.java 2005-11-02 16:11:50.000000000 +0200 >+++ plugins\org.eclipse.jdt.junit\src/org/eclipse/jdt/internal/junit/wizards/UpdateTestSuite.java 2005-12-03 20:35:25.294676200 +0200 >@@ -240,7 +240,7 @@ > IType testType= (IType) selectedClasses[i]; > IMethod suiteMethod= testType.getMethod("suite", new String[] {}); //$NON-NLS-1$ > if (!suiteMethod.exists()) { >- suite.append("suite.addTestSuite("+testType.getElementName()+".class);"); //$NON-NLS-1$ //$NON-NLS-2$ >+ suite.append("suite.addTestSuite("+testType.getTypeQualifiedName('.')+".class);"); //$NON-NLS-1$ //$NON-NLS-2$ > } else { > suite.append("suite.addTest("+testType.getElementName()+".suite());"); //$NON-NLS-1$ //$NON-NLS-2$ > } >diff -ur plugins\Copy of org.eclipse.jdt.junit\src/org/eclipse/jdt/junit/wizards/NewTestSuiteWizardPage.java plugins\org.eclipse.jdt.junit\src/org/eclipse/jdt/junit/wizards/NewTestSuiteWizardPage.java >--- plugins\Copy of org.eclipse.jdt.junit\src/org/eclipse/jdt/junit/wizards/NewTestSuiteWizardPage.java 2005-11-02 16:11:38.000000000 +0200 >+++ plugins\org.eclipse.jdt.junit\src/org/eclipse/jdt/junit/wizards/NewTestSuiteWizardPage.java 2005-12-03 20:50:12.415406200 +0200 >@@ -275,7 +275,7 @@ > > fClassesInSuiteTable.getTable().setLayoutData(gd); > fClassesInSuiteTable.setContentProvider(new SuiteClassesContentProvider()); >- fClassesInSuiteTable.setLabelProvider(new JavaElementLabelProvider()); >+ fClassesInSuiteTable.setLabelProvider(new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_QUALIFIED)); > fClassesInSuiteTable.addCheckStateListener(new ICheckStateListener() { > public void checkStateChanged(CheckStateChangedEvent event) { > handleFieldChanged(CLASSES_IN_SUITE);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 119177
: 31095 |
31096