Java 类org.junit.internal.requests.SortingRequest 实例源码

项目:sosiefier    文件:MaxCore.java   
/**
 * @return a new Request, which contains all of the same tests, but in a new order.
 */
public Request sortRequest(Request request) {
    if (request instanceof SortingRequest) {
        // We'll pay big karma points for this
        return request;
    }
    List<Description> leaves = findLeaves(request);
    Collections.sort(leaves, fHistory.testComparator());
    return constructLeafRequest(leaves);
}
项目:lcm    文件:MaxCore.java   
/**
 * @return a new Request, which contains all of the same tests, but in a new order.
 */
public Request sortRequest(Request request) {
    if (request instanceof SortingRequest) {
        // We'll pay big karma points for this
        return request;
    }
    List<Description> leaves = findLeaves(request);
    Collections.sort(leaves, fHistory.testComparator());
    return constructLeafRequest(leaves);
}
项目:junit    文件:MaxCore.java   
/**
 * @return a new Request, which contains all of the same tests, but in a new order.
 */
public Request sortRequest(Request request) {
    if (request instanceof SortingRequest) {
        // We'll pay big karma points for this
        return request;
    }
    List<Description> leaves = findLeaves(request);
    Collections.sort(leaves, fHistory.testComparator());
    return constructLeafRequest(leaves);
}
项目:org.openntf.domino    文件:MaxCore.java   
/**
 * @return a new Request, which contains all of the same tests, but in a new order.
 */
public Request sortRequest(Request request) {
    if (request instanceof SortingRequest) {
        // We'll pay big karma points for this
        return request;
    }
    List<Description> leaves = findLeaves(request);
    Collections.sort(leaves, fHistory.testComparator());
    return constructLeafRequest(leaves);
}
项目:sosiefier    文件:Request.java   
/**
 * Returns a Request whose Tests can be run in a certain order, defined by
 * <code>comparator</code>
 * <p>
 * For example, here is code to run a test suite in alphabetical order:
 * <pre>
 * private static Comparator&lt;Description&gt; forward() {
 * return new Comparator&lt;Description&gt;() {
 * public int compare(Description o1, Description o2) {
 * return o1.getDisplayName().compareTo(o2.getDisplayName());
 * }
 * };
 * }
 *
 * public static main() {
 * new JUnitCore().run(Request.aClass(AllTests.class).sortWith(forward()));
 * }
 * </pre>
 *
 * @param comparator definition of the order of the tests in this Request
 * @return a Request with ordered Tests
 */
public Request sortWith(Comparator<Description> comparator) {
    return new SortingRequest(this, comparator);
}
项目:lcm    文件:Request.java   
/**
 * Returns a Request whose Tests can be run in a certain order, defined by
 * <code>comparator</code>
 *
 * For example, here is code to run a test suite in alphabetical order:
 *
 * <pre>
 * private static Comparator<Description> forward() {
 * return new Comparator<Description>() {
 * public int compare(Description o1, Description o2) {
 * return o1.getDisplayName().compareTo(o2.getDisplayName());
 * }
 * };
 * }
 *
 * public static main() {
 * new JUnitCore().run(Request.aClass(AllTests.class).sortWith(forward()));
 * }
 * </pre>
 *
 * @param comparator definition of the order of the tests in this Request
 * @return a Request with ordered Tests
 */
public Request sortWith(Comparator<Description> comparator) {
    return new SortingRequest(this, comparator);
}
项目:junit    文件:Request.java   
/**
 * Returns a Request whose Tests can be run in a certain order, defined by
 * <code>comparator</code>
 *
 * For example, here is code to run a test suite in alphabetical order:
 *
 * <pre>
 * private static Comparator<Description> forward() {
 * return new Comparator<Description>() {
 * public int compare(Description o1, Description o2) {
 * return o1.getDisplayName().compareTo(o2.getDisplayName());
 * }
 * };
 * }
 *
 * public static main() {
 * new JUnitCore().run(Request.aClass(AllTests.class).sortWith(forward()));
 * }
 * </pre>
 *
 * @param comparator definition of the order of the tests in this Request
 * @return a Request with ordered Tests
 */
public Request sortWith(Comparator<Description> comparator) {
    return new SortingRequest(this, comparator);
}
项目:org.openntf.domino    文件:Request.java   
/**
 * Returns a Request whose Tests can be run in a certain order, defined by
 * <code>comparator</code>
 *
 * For example, here is code to run a test suite in alphabetical order:
 *
 * <pre>
 * private static Comparator<Description> forward() {
 * return new Comparator<Description>() {
 * public int compare(Description o1, Description o2) {
 * return o1.getDisplayName().compareTo(o2.getDisplayName());
 * }
 * };
 * }
 *
 * public static main() {
 * new JUnitCore().run(Request.aClass(AllTests.class).sortWith(forward()));
 * }
 * </pre>
 *
 * @param comparator definition of the order of the tests in this Request
 * @return a Request with ordered Tests
 */
public Request sortWith(Comparator<Description> comparator) {
    return new SortingRequest(this, comparator);
}