All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.bechte.junit.runners.scheduler.DirectInvokeScheduler Maven / Gradle / Ivy

Go to download

This is a runner implementation that supports context hierarchies in JUnit. For more details please visit: https://github.com/bechte/junit-hierarchicalcontextrunner/wiki

There is a newer version: 4.12.2
Show newest version
package de.bechte.junit.runners.scheduler;

import org.junit.runners.model.RunnerScheduler;

/**
 * The {@link DirectInvokeScheduler} is a simple {@link RunnerScheduler} implementation that runs all incoming requests
 * on demand. No scheduling is performed and all operations are immediately executed.
 *
 * Note: This feature might be go away in future release of JUnit!
 */
public class DirectInvokeScheduler implements RunnerScheduler {
    public void schedule(final Runnable runnable) {
        if (runnable == null)
            throw new IllegalArgumentException("Runnable must not be null!");
        runnable.run();
    }

    public void finished() {
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy