Search in sources :

Example 11 with MultipleFailureException

use of org.junit.runners.model.MultipleFailureException in project android-priority-jobqueue by yigit.

the class ApplicationContextTests method getContextTest.

public void getContextTest(boolean persistent) throws InterruptedException, MultipleFailureException {
    final ContextCheckJob addedJob = new ContextCheckJob(new Params(1).setPersistent(persistent));
    final JobManager jobManager = createJobManager();
    waitUntilAJobIsDone(jobManager, new WaitUntilCallback() {

        @Override
        public void run() {
            jobManager.addJob(addedJob);
        }

        @Override
        public void assertJob(Job job) {
        }
    });
    if (!errors.isEmpty()) {
        throw new MultipleFailureException(errors);
    }
}
Also used : MultipleFailureException(org.junit.runners.model.MultipleFailureException) Params(com.birbit.android.jobqueue.Params) JobManager(com.birbit.android.jobqueue.JobManager) Job(com.birbit.android.jobqueue.Job)

Aggregations

MultipleFailureException (org.junit.runners.model.MultipleFailureException)11 ArrayList (java.util.ArrayList)5 Statement (org.junit.runners.model.Statement)4 Test (org.junit.Test)3 AssumptionViolatedException (org.junit.internal.AssumptionViolatedException)3 Description (org.junit.runner.Description)2 Failure (org.junit.runner.notification.Failure)2 Job (com.birbit.android.jobqueue.Job)1 JobManager (com.birbit.android.jobqueue.JobManager)1 Params (com.birbit.android.jobqueue.Params)1 IOException (java.io.IOException)1 ObjectInputStream (java.io.ObjectInputStream)1 Method (java.lang.reflect.Method)1 HttpURLConnection (java.net.HttpURLConnection)1 URL (java.net.URL)1 List (java.util.List)1 ExecutionException (java.util.concurrent.ExecutionException)1 TimeoutException (java.util.concurrent.TimeoutException)1 AtomicReference (java.util.concurrent.atomic.AtomicReference)1 JsonString (javax.json.JsonString)1