Code example for TestCase

Methods: getName

0
    private int bugNum = -1;
     
    public FailingTest( TestCase test, int bugNumber ){
        this.test = test;
        this.bugNum = bugNumber;
        String name= "Failing " + test.getName();
        if (bugNum > 0) {
        	name += " [bug " + bugNum + "]";
        } 
        setName(name);
    } 
     
    public FailingTest( TestCase test ){
        this(test, -1);
    } 
    /* (non-Javadoc) 
     * @see junit.framework.Test#run(junit.framework.TestResult) 
     */ 
    public void run( TestResult result ) {
        result.startTest( this );