Java Code Examples for junit.framework.TestCase#setName()

The following examples show how to use junit.framework.TestCase#setName() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PercentToBraceConverterTest.java    From Pydev with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * Launch the test.
 *
 * @param args
 *            the command line arguments
 *
 * @generatedBy CodePro at 25.01.11 11:00
 */
public static void main(String[] args) {
    if (args.length == 0) {
        // Run all of the tests
        junit.textui.TestRunner.run(PercentToBraceConverterTest.class);
    } else {
        // Run only the named tests
        TestSuite suite = new TestSuite("Selected tests");
        for (int i = 0; i < args.length; i++) {
            TestCase test = new PercentToBraceConverterTest();
            test.setName(args[i]);
            suite.addTest(test);
        }
        junit.textui.TestRunner.run(suite);
    }
}