本文整理汇总了Java中org.junit.experimental.theories.internal.Assignments类的典型用法代码示例。如果您正苦于以下问题:Java Assignments类的具体用法?Java Assignments怎么用?Java Assignments使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Assignments类属于org.junit.experimental.theories.internal包,在下文中一共展示了Assignments类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: runWithIncompleteAssignment
import org.junit.experimental.theories.internal.Assignments; //导入依赖的package包/类
@Override
protected void runWithIncompleteAssignment(Assignments incomplete) throws Throwable{
for(PotentialAssignment source:incomplete.potentialsForNextUnassigned()){
final Assignments nextAssignment = incomplete.assignNext(source);
ForkJoinTask<?> run = new RecursiveAction(){
@Override
protected void compute(){
try{
ParallelTheoryAnchor.this.runWithAssignment(nextAssignment);
}catch(Throwable t){
throw new RuntimeException(t);
}
}
};
runs.addFirst(run.fork());
}
}
开发者ID:splicemachine,项目名称:spliceengine,代码行数:18,代码来源:ParallelTheoryRunner.java
示例2: evaluate
import org.junit.experimental.theories.internal.Assignments; //导入依赖的package包/类
@Override
public void evaluate() throws Throwable {
runWithAssignment(Assignments.allUnassigned(
fTestMethod.getMethod(), getTestClass()));
//if this test method is not annotated with Theory, then no successes is a valid case
boolean hasTheoryAnnotation = fTestMethod.getAnnotation(Theory.class) != null;
if (successes == 0 && hasTheoryAnnotation) {
Assert
.fail("Never found parameters that satisfied method assumptions. Violated assumptions: "
+ fInvalidParameters);
}
}
开发者ID:DIVERSIFY-project,项目名称:sosiefier,代码行数:14,代码来源:Theories.java
示例3: runWithAssignment
import org.junit.experimental.theories.internal.Assignments; //导入依赖的package包/类
protected void runWithAssignment(Assignments parameterAssignment)
throws Throwable {
if (!parameterAssignment.isComplete()) {
runWithIncompleteAssignment(parameterAssignment);
} else {
runWithCompleteAssignment(parameterAssignment);
}
}
开发者ID:DIVERSIFY-project,项目名称:sosiefier,代码行数:9,代码来源:Theories.java
示例4: runWithIncompleteAssignment
import org.junit.experimental.theories.internal.Assignments; //导入依赖的package包/类
protected void runWithIncompleteAssignment(Assignments incomplete)
throws Throwable {
for (PotentialAssignment source : incomplete
.potentialsForNextUnassigned()) {
runWithAssignment(incomplete.assignNext(source));
}
}
开发者ID:DIVERSIFY-project,项目名称:sosiefier,代码行数:8,代码来源:Theories.java
示例5: methodCompletesWithParameters
import org.junit.experimental.theories.internal.Assignments; //导入依赖的package包/类
private Statement methodCompletesWithParameters(
final FrameworkMethod method, final Assignments complete, final Object freshInstance) {
return new Statement() {
@Override
public void evaluate() throws Throwable {
final Object[] values = complete.getMethodArguments();
if (!nullsOk()) {
Assume.assumeNotNull(values);
}
method.invokeExplosively(freshInstance, values);
}
};
}
开发者ID:DIVERSIFY-project,项目名称:sosiefier,代码行数:16,代码来源:Theories.java
示例6: runWithIncompleteAssignment
import org.junit.experimental.theories.internal.Assignments; //导入依赖的package包/类
@Override
protected void runWithIncompleteAssignment(Assignments incomplete)
throws Throwable {
GuesserQueue guessers = createGuesserQueue(incomplete);
queues.add(guessers);
while (!guessers.isEmpty())
runWithAssignment(incomplete.assignNext(guessers.remove(0)));
queues.remove(guessers);
}
开发者ID:DIVERSIFY-project,项目名称:sosiefier,代码行数:10,代码来源:StubbedTheories.java
示例7: createGuesserQueue
import org.junit.experimental.theories.internal.Assignments; //导入依赖的package包/类
private GuesserQueue createGuesserQueue(Assignments incomplete)
throws Throwable {
ParameterSignature nextUnassigned = incomplete.nextUnassigned();
if (nextUnassigned.hasAnnotation(Stub.class)) {
GuesserQueue queue = new GuesserQueue();
queue.add(new Guesser<Object>(nextUnassigned.getType()));
return queue;
}
return GuesserQueue.forSingleValues(incomplete.potentialsForNextUnassigned());
}
开发者ID:DIVERSIFY-project,项目名称:sosiefier,代码行数:13,代码来源:StubbedTheories.java
示例8: evaluate
import org.junit.experimental.theories.internal.Assignments; //导入依赖的package包/类
@Override
public void evaluate() throws Throwable {
runWithAssignment(Assignments.allUnassigned(
fTestMethod.getMethod(), getTestClass()));
if (successes == 0) {
Assert
.fail("Never found parameters that satisfied method assumptions. Violated assumptions: "
+ fInvalidParameters);
}
}
开发者ID:lcm-proj,项目名称:lcm,代码行数:12,代码来源:Theories.java
示例9: runWithIncompleteAssignment
import org.junit.experimental.theories.internal.Assignments; //导入依赖的package包/类
protected void runWithIncompleteAssignment(Assignments incomplete)
throws InstantiationException, IllegalAccessException,
Throwable {
for (PotentialAssignment source : incomplete
.potentialsForNextUnassigned()) {
runWithAssignment(incomplete.assignNext(source));
}
}
开发者ID:lcm-proj,项目名称:lcm,代码行数:9,代码来源:Theories.java
示例10: methodCompletesWithParameters
import org.junit.experimental.theories.internal.Assignments; //导入依赖的package包/类
private Statement methodCompletesWithParameters(
final FrameworkMethod method, final Assignments complete, final Object freshInstance) {
return new Statement() {
@Override
public void evaluate() throws Throwable {
try {
final Object[] values = complete.getMethodArguments(
nullsOk());
method.invokeExplosively(freshInstance, values);
} catch (CouldNotGenerateValueException e) {
// ignore
}
}
};
}
开发者ID:lcm-proj,项目名称:lcm,代码行数:16,代码来源:Theories.java
示例11: runWithIncompleteAssignment
import org.junit.experimental.theories.internal.Assignments; //导入依赖的package包/类
@Override
protected void runWithIncompleteAssignment(Assignments incomplete)
throws InstantiationException, IllegalAccessException,
Throwable {
GuesserQueue guessers = createGuesserQueue(incomplete);
queues.add(guessers);
while (!guessers.isEmpty())
runWithAssignment(incomplete.assignNext(guessers.remove(0)));
queues.remove(guessers);
}
开发者ID:MattiasBuelens,项目名称:junit,代码行数:11,代码来源:StubbedTheories.java
示例12: createGuesserQueue
import org.junit.experimental.theories.internal.Assignments; //导入依赖的package包/类
private GuesserQueue createGuesserQueue(Assignments incomplete)
throws InstantiationException, IllegalAccessException {
ParameterSignature nextUnassigned = incomplete.nextUnassigned();
if (nextUnassigned.hasAnnotation(Stub.class)) {
GuesserQueue queue = new GuesserQueue();
queue.add(new Guesser<Object>(nextUnassigned.getType()));
return queue;
}
return GuesserQueue.forSingleValues(incomplete.potentialsForNextUnassigned());
}
开发者ID:MattiasBuelens,项目名称:junit,代码行数:13,代码来源:StubbedTheories.java
示例13: potentialAssignments
import org.junit.experimental.theories.internal.Assignments; //导入依赖的package包/类
public static List<PotentialAssignment> potentialAssignments(Method method)
throws Throwable {
return Assignments.allUnassigned(method,
new TestClass(method.getDeclaringClass()))
.potentialsForNextUnassigned();
}
开发者ID:DIVERSIFY-project,项目名称:sosiefier,代码行数:7,代码来源:TheoryTestUtils.java
示例14: potentialValues
import org.junit.experimental.theories.internal.Assignments; //导入依赖的package包/类
private List<PotentialAssignment> potentialValues(Method method)
throws Exception {
return Assignments.allUnassigned(method,
new TestClass(HasDateMethod.class))
.potentialsForNextUnassigned();
}
开发者ID:MattiasBuelens,项目名称:junit,代码行数:7,代码来源:WithDataPointMethod.java
注:本文中的org.junit.experimental.theories.internal.Assignments类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论