Java 类org.junit.experimental.theories.ParameterSupplier 实例源码

项目:sosiefier    文件:Assignments.java   
private ParameterSupplier getSupplier(ParameterSignature unassigned)
        throws Exception {
    ParametersSuppliedBy annotation = unassigned
            .findDeepAnnotation(ParametersSuppliedBy.class);

    if (annotation != null) {
        return buildParameterSupplierFromClass(annotation.value());
    } else {
        return new AllMembersSupplier(fClass);
    }
}
项目:sosiefier    文件:Assignments.java   
private ParameterSupplier buildParameterSupplierFromClass(
        Class<? extends ParameterSupplier> cls) throws Exception {
    Constructor<?>[] supplierConstructors = cls.getConstructors();

    for (Constructor<?> constructor : supplierConstructors) {
        Class<?>[] parameterTypes = constructor.getParameterTypes();
        if (parameterTypes.length == 1
                && parameterTypes[0].equals(TestClass.class)) {
            return (ParameterSupplier) constructor.newInstance(fClass);
        }
    }

    return cls.newInstance();
}
项目:lcm    文件:Assignments.java   
public ParameterSupplier getSupplier(ParameterSignature unassigned)
        throws InstantiationException, IllegalAccessException {
    ParameterSupplier supplier = getAnnotatedSupplier(unassigned);
    if (supplier != null) {
        return supplier;
    }

    return new AllMembersSupplier(fClass);
}
项目:lcm    文件:Assignments.java   
public ParameterSupplier getAnnotatedSupplier(ParameterSignature unassigned)
        throws InstantiationException, IllegalAccessException {
    ParametersSuppliedBy annotation = unassigned
            .findDeepAnnotation(ParametersSuppliedBy.class);
    if (annotation == null) {
        return null;
    }
    return annotation.value().newInstance();
}
项目:junit    文件:Assignments.java   
public ParameterSupplier getSupplier(ParameterSignature unassigned)
        throws InstantiationException, IllegalAccessException {
    ParameterSupplier supplier = getAnnotatedSupplier(unassigned);
    if (supplier != null) {
        return supplier;
    }

    return new AllMembersSupplier(fClass);
}
项目:junit    文件:Assignments.java   
public ParameterSupplier getAnnotatedSupplier(ParameterSignature unassigned)
        throws InstantiationException, IllegalAccessException {
    ParametersSuppliedBy annotation = unassigned
            .findDeepAnnotation(ParametersSuppliedBy.class);
    if (annotation == null) {
        return null;
    }
    return annotation.value().newInstance();
}
项目:org.openntf.domino    文件:Assignments.java   
public ParameterSupplier getSupplier(ParameterSignature unassigned)
        throws InstantiationException, IllegalAccessException {
    ParameterSupplier supplier = getAnnotatedSupplier(unassigned);
    if (supplier != null) {
        return supplier;
    }

    return new AllMembersSupplier(fClass);
}
项目:org.openntf.domino    文件:Assignments.java   
public ParameterSupplier getAnnotatedSupplier(ParameterSignature unassigned)
        throws InstantiationException, IllegalAccessException {
    ParametersSuppliedBy annotation = unassigned
            .findDeepAnnotation(ParametersSuppliedBy.class);
    if (annotation == null) {
        return null;
    }
    return annotation.value().newInstance();
}