Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
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
⏎ org/junit/runners/Suite.java
package org.junit.runners; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import java.util.Collections; import java.util.List; import org.junit.internal.builders.AllDefaultPossibilitiesBuilder; import org.junit.runner.Description; import org.junit.runner.Runner; import org.junit.runner.notification.RunNotifier; import org.junit.runners.model.InitializationError; import org.junit.runners.model.RunnerBuilder; /** * Using <code>Suite</code> as a runner allows you to manually * build a suite containing tests from many classes. It is the JUnit 4 equivalent of the JUnit 3.8.x * static {@link junit.framework.Test} <code>suite()</code> method. To use it, annotate a class * with <code>@RunWith(Suite.class)</code> and <code>@SuiteClasses({TestClass1.class, ...})</code>. * When you run this class, it will run all the tests in all the suite classes. * * @since 4.0 */ public class Suite extends ParentRunner<Runner> { /** * Returns an empty suite. */ public static Runner emptySuite() { try { return new Suite((Class<?>) null, new Class<?>[0]); } catch (InitializationError e) { throw new RuntimeException("This shouldn't be possible"); } } /** * The <code>SuiteClasses</code> annotation specifies the classes to be run when a class * annotated with <code>@RunWith(Suite.class)</code> is run. */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) @Inherited public @interface SuiteClasses { /** * @return the classes to be run */ Class<?>[] value(); } private static Class<?>[] getAnnotatedClasses(Class<?> klass) throws InitializationError { SuiteClasses annotation = klass.getAnnotation(SuiteClasses.class); if (annotation == null) { throw new InitializationError(String.format("class '%s' must have a SuiteClasses annotation", klass.getName())); } return annotation.value(); } private final List<Runner> runners; /** * Called reflectively on classes annotated with <code>@RunWith(Suite.class)</code> * * @param klass the root class * @param builder builds runners for classes in the suite */ public Suite(Class<?> klass, RunnerBuilder builder) throws InitializationError { this(builder, klass, getAnnotatedClasses(klass)); } /** * Call this when there is no single root class (for example, multiple class names * passed on the command line to {@link org.junit.runner.JUnitCore} * * @param builder builds runners for classes in the suite * @param classes the classes in the suite */ public Suite(RunnerBuilder builder, Class<?>[] classes) throws InitializationError { this(null, builder.runners(null, classes)); } /** * Call this when the default builder is good enough. Left in for compatibility with JUnit 4.4. * * @param klass the root of the suite * @param suiteClasses the classes in the suite */ protected Suite(Class<?> klass, Class<?>[] suiteClasses) throws InitializationError { this(new AllDefaultPossibilitiesBuilder(), klass, suiteClasses); } /** * Called by this class and subclasses once the classes making up the suite have been determined * * @param builder builds runners for classes in the suite * @param klass the root of the suite * @param suiteClasses the classes in the suite */ protected Suite(RunnerBuilder builder, Class<?> klass, Class<?>[] suiteClasses) throws InitializationError { this(klass, builder.runners(klass, suiteClasses)); } /** * Called by this class and subclasses once the runners making up the suite have been determined * * @param klass root of the suite * @param runners for each class in the suite, a {@link Runner} */ protected Suite(Class<?> klass, List<Runner> runners) throws InitializationError { super(klass); this.runners = Collections.unmodifiableList(runners); } @Override protected List<Runner> getChildren() { return runners; } @Override protected Description describeChild(Runner child) { return child.getDescription(); } @Override protected void runChild(Runner runner, final RunNotifier notifier) { runner.run(notifier); } }
⏎ org/junit/runners/Suite.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
2016-03-28, 13691👍, 0💬
Popular Posts:
JDK 11 jdk.jdi.jmod is the JMOD file for JDK 11 JDI (Java Debug Interface) tool. JDK 11 JDI tool com...
How to download and install JDK (Java Development Kit) 1.3? If you want to write Java applications, ...
XStream is a simple library to serialize objects to XML and back again. JAR File Size and Download L...
JDK 11 jdk.httpserver.jmod is the JMOD file for JDK 11 HTTP Server module. JDK 11 HTTP Server module...
Where Can I see Java Source Code files for Xerces Java 2.11.2? Here are Java Source Code files for X...