FileDocCategorySizeDatePackage
TestCaseUtilTest.javaAPI DocAndroid 1.5 API3458Wed May 06 22:42:02 BST 2009android.test

TestCaseUtilTest

public class TestCaseUtilTest extends TestCase

Fields Summary
Constructors Summary
Methods Summary
public voidtestCreateTestForTestCase()

        Test test = TestCaseUtil.createTestSuite(OneTestTestCase.class);
        assertEquals(1, test.countTestCases());
    
public voidtestCreateTestForTestCaseWithSuiteMethod()

        Test test = TestCaseUtil.createTestSuite(OneTestTestCaseWithSuite.class);
        assertEquals(1, test.countTestCases());
    
public voidtestCreateTestForTestSuiteWithSuiteMethod()

        Test test = TestCaseUtil.createTestSuite(TwoTestsInTestSuite.class);
        assertEquals(2, test.countTestCases());
    
public voidtestGetTestCaseNamesForTestCaseWithSuiteMethod()

        TestCase testCase = new OneTestTestCaseWithSuite();

        List<String> testCaseNames = TestCaseUtil.getTestCaseNames(testCase, false);

        assertEquals(1, testCaseNames.size());
        assertTrue(testCaseNames.get(0).endsWith("testOne"));
    
public voidtestGetTestCaseNamesForTestSuiteWithSuiteMethod()

        TestSuite testSuite = new TwoTestsInTestSuite();

        List<String> testCaseNames = TestCaseUtil.getTestCaseNames(testSuite, false);

        assertEquals(2, testCaseNames.size());
        assertTrue(testCaseNames.get(0).endsWith("OneTestTestCase"));
        assertTrue(testCaseNames.get(1).endsWith("OneTestTestSuite"));
    
public voidtestReturnEmptyStringForTestSuiteWithNoName()

        assertEquals("", TestCaseUtil.getTestName(new TestSuite()));