FileDocCategorySizeDatePackage
AndroidManifestParserTest.javaAPI DocAndroid 1.5 API3373Wed May 06 22:41:10 BST 2009com.android.ide.eclipse.common.project

AndroidManifestParserTest

public class AndroidManifestParserTest extends junit.framework.TestCase
Tests for {@link AndroidManifestParser}

Fields Summary
private AndroidManifestParser
mManifestTestApp
private AndroidManifestParser
mManifestInstrumentation
private static final String
INSTRUMENTATION_XML
private static final String
TESTAPP_XML
private static final String
PACKAGE_NAME
private static final String
ACTIVITY_NAME
private static final String
LIBRARY_NAME
private static final String
INSTRUMENTATION_NAME
private static final String
INSTRUMENTATION_TARGET
Constructors Summary
Methods Summary
protected voidsetUp()

 //$NON-NLS-1$
    
         
        super.setUp();
        
        String testFilePath = AdtTestData.getInstance().getTestFilePath(
                TESTAPP_XML);
        mManifestTestApp = AndroidManifestParser.parseForData(testFilePath);
        assertNotNull(mManifestTestApp);
        
        testFilePath = AdtTestData.getInstance().getTestFilePath(
                INSTRUMENTATION_XML);
        mManifestInstrumentation = AndroidManifestParser.parseForData(testFilePath);
        assertNotNull(mManifestInstrumentation);
    
public voidtestGetActivities()

        assertEquals(1, mManifestTestApp.getActivities().length);
        assertEquals(ACTIVITY_NAME, mManifestTestApp.getActivities()[0]); 
    
public voidtestGetInstrumentationInformation()

        assertEquals(1, mManifestInstrumentation.getInstrumentations().length);
        assertEquals(INSTRUMENTATION_NAME, 
                mManifestInstrumentation.getInstrumentations()[0].getName());
        assertEquals(INSTRUMENTATION_TARGET, 
                mManifestInstrumentation.getInstrumentations()[0].getTargetPackage());
    
public voidtestGetLauncherActivity()

        assertEquals(ACTIVITY_NAME, mManifestTestApp.getLauncherActivity()); 
    
public voidtestGetPackage()

        assertEquals(PACKAGE_NAME, mManifestTestApp.getPackage());
    
public voidtestGetPackageName()

        assertEquals(PACKAGE_NAME, mManifestTestApp.getPackage());
    
public voidtestGetUsesLibraries()

        assertEquals(1, mManifestTestApp.getUsesLibraries().length);
        assertEquals(LIBRARY_NAME, mManifestTestApp.getUsesLibraries()[0]);