JUnit 4.13.2 Source Code Files

JUnit Source Code Files are provided in the source package file, junit-4.13.2-sources.jar.

You can browse JUnit Source Code files below:

✍: FYIcenter.com

junit/extensions/TestDecorator.java

package junit.extensions;

import junit.framework.Assert;
import junit.framework.Test;
import junit.framework.TestResult;

/**
 * A Decorator for Tests. Use TestDecorator as the base class for defining new
 * test decorators. Test decorator subclasses can be introduced to add behaviour
 * before or after a test is run.
 */
@SuppressWarnings("deprecation")
public class TestDecorator extends Assert implements Test {
    protected Test fTest;

    public TestDecorator(Test test) {
        fTest = test;
    }

    /**
     * The basic run behaviour.
     */
    public void basicRun(TestResult result) {
        fTest.run(result);
    }

    public int countTestCases() {
        return fTest.countTestCases();
    }

    public void run(TestResult result) {
        basicRun(result);
    }

    @Override
    public String toString() {
        return fTest.toString();
    }

    public Test getTest() {
        return fTest;
    }
}

junit/extensions/TestDecorator.java

 

Or download all of them as a single archive file:

File name: junit-4.13.2-sources.jar
File size: 234540 bytes
Release date: 2021-02-13
Download 

 

Download and Install junit-4.12.jar

Download and Install junit-4.13.2.jar

Download and Install JUnit (Java Unit) Testing

⇑⇑ FAQ for JUnit (Java Unit) Testing

2016-03-28, 17304👍, 0💬