Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
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 (322)
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/experimental/theories/internal/SpecificDataPointsSupplier.java
package org.junit.experimental.theories.internal;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import org.junit.experimental.theories.DataPoint;
import org.junit.experimental.theories.DataPoints;
import org.junit.experimental.theories.FromDataPoints;
import org.junit.experimental.theories.ParameterSignature;
import org.junit.runners.model.FrameworkMethod;
import org.junit.runners.model.TestClass;
public class SpecificDataPointsSupplier extends AllMembersSupplier {
public SpecificDataPointsSupplier(TestClass testClass) {
super(testClass);
}
@Override
protected Collection<Field> getSingleDataPointFields(ParameterSignature sig) {
Collection<Field> fields = super.getSingleDataPointFields(sig);
String requestedName = sig.getAnnotation(FromDataPoints.class).value();
List<Field> fieldsWithMatchingNames = new ArrayList<Field>();
for (Field field : fields) {
String[] fieldNames = field.getAnnotation(DataPoint.class).value();
if (Arrays.asList(fieldNames).contains(requestedName)) {
fieldsWithMatchingNames.add(field);
}
}
return fieldsWithMatchingNames;
}
@Override
protected Collection<Field> getDataPointsFields(ParameterSignature sig) {
Collection<Field> fields = super.getDataPointsFields(sig);
String requestedName = sig.getAnnotation(FromDataPoints.class).value();
List<Field> fieldsWithMatchingNames = new ArrayList<Field>();
for (Field field : fields) {
String[] fieldNames = field.getAnnotation(DataPoints.class).value();
if (Arrays.asList(fieldNames).contains(requestedName)) {
fieldsWithMatchingNames.add(field);
}
}
return fieldsWithMatchingNames;
}
@Override
protected Collection<FrameworkMethod> getSingleDataPointMethods(ParameterSignature sig) {
Collection<FrameworkMethod> methods = super.getSingleDataPointMethods(sig);
String requestedName = sig.getAnnotation(FromDataPoints.class).value();
List<FrameworkMethod> methodsWithMatchingNames = new ArrayList<FrameworkMethod>();
for (FrameworkMethod method : methods) {
String[] methodNames = method.getAnnotation(DataPoint.class).value();
if (Arrays.asList(methodNames).contains(requestedName)) {
methodsWithMatchingNames.add(method);
}
}
return methodsWithMatchingNames;
}
@Override
protected Collection<FrameworkMethod> getDataPointsMethods(ParameterSignature sig) {
Collection<FrameworkMethod> methods = super.getDataPointsMethods(sig);
String requestedName = sig.getAnnotation(FromDataPoints.class).value();
List<FrameworkMethod> methodsWithMatchingNames = new ArrayList<FrameworkMethod>();
for (FrameworkMethod method : methods) {
String[] methodNames = method.getAnnotation(DataPoints.class).value();
if (Arrays.asList(methodNames).contains(requestedName)) {
methodsWithMatchingNames.add(method);
}
}
return methodsWithMatchingNames;
}
}
⏎ org/junit/experimental/theories/internal/SpecificDataPointsSupplier.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, ≈52🔥, 0💬
Popular Posts:
How to download and install Apache ZooKeeper Source Package? Apache ZooKeeper is an open-source serv...
commons-net-1.4.1.jar is the JAR file for Apache Commons Net 1.4.1, which implements the client side...
maven-core-3.8.6.jar is the JAR file for Apache Maven 3.8.6 Core module. Apache Maven is a software ...
Commons Pool provides an Object-pooling API, with three major aspects: 1. A generic object pool inte...
JBrowser Source Code Files are provided in the source package file. You can download JBrowser source...