FileDocCategorySizeDatePackage
ProjectHelperTest.javaAPI DocAndroid 1.5 API2597Wed May 06 22:41:10 BST 2009com.android.ide.eclipse.adt.project

ProjectHelperTest

public class ProjectHelperTest extends TestCase

Fields Summary
private static final String
OLD_CONTAINER_ID
The old container id
private static final String
CONTAINER_ID
The container id for the android framework jar file
Constructors Summary
Methods Summary
public voidsetUp()

 //$NON-NLS-1$
    
    
         
        // pass for now
    
public voidtearDown()

        // pass for now
    
public final voidtestFixProjectClasspathEntriesFromOldContainer()

        // create a project with a path to an android .zip
        JavaProjectMock javaProject = new JavaProjectMock(
                new IClasspathEntry[] {
                        new ClasspathEntryMock(new Path("Project/src"), //$NON-NLS-1$
                                IClasspathEntry.CPE_SOURCE),
                        new ClasspathEntryMock(new Path(OLD_CONTAINER_ID),
                                IClasspathEntry.CPE_CONTAINER),
                },
                new Path("Project/bin"));
        
        ProjectHelper.fixProjectClasspathEntries(javaProject);
        
        IClasspathEntry[] fixedEntries = javaProject.getRawClasspath();
        assertEquals(3, fixedEntries.length);
        assertEquals("Project/src", fixedEntries[0].getPath().toString());
        assertEquals(OLD_CONTAINER_ID, fixedEntries[1].getPath().toString());
        assertEquals(CONTAINER_ID, fixedEntries[2].getPath().toString());