FileDocCategorySizeDatePackage
TestCaseReference.javaAPI DocAndroid 1.5 API2305Wed May 06 22:41:10 BST 2009com.android.ide.eclipse.adt.launch.junit.runtime

TestCaseReference

public class TestCaseReference extends AndroidTestReference
Reference for a single Android test method.

Fields Summary
private final String
mClassName
private final String
mTestName
Constructors Summary
TestCaseReference(String className, String testName)
Creates a TestCaseReference from a class and method name

        mClassName = className;
        mTestName = testName;
    
TestCaseReference(com.android.ddmlib.testrunner.TestIdentifier test)
Creates a TestCaseReference from a {@link TestIdentifier}

param
test

        mClassName = test.getClassName();
        mTestName = test.getTestName();
    
Methods Summary
public intcountTestCases()
Returns a count of the number of test cases referenced. Is always one for this class.

        return 1;
    
public java.lang.StringgetName()
Returns the identifier of this test, in a format expected by JDT JUnit

        return MessageFormat.format(MessageIds.TEST_IDENTIFIER_MESSAGE_FORMAT, 
                new Object[] { mTestName, mClassName});
    
public voidsendTree(org.eclipse.jdt.internal.junit.runner.IVisitsTestTrees notified)
Sends test identifier and test count information for this test

param
notified the {@link IVisitsTestTrees} to send test info to

        notified.visitTreeEntry(getIdentifier(), false, countTestCases());