Package org.junit.internal.runners.model

Examples of org.junit.internal.runners.model.MultipleFailureException


        try {
            afterTestMethodCallbacks.evaluate();
            fail();
        } catch (Throwable e) {
            assertThat(e, instanceOf(MultipleFailureException.class));
            MultipleFailureException multipleFailureException = (MultipleFailureException) e;
            assertThat(multipleFailureException.getFailures().size(), is(2));
        }

    }
View Full Code Here


      }
      if(exceptions.size() == 1)
      {
         throw exceptions.get(0);
      }
      throw new MultipleFailureException(exceptions);
   }
View Full Code Here

    return statusFor(error);
  }

  // for better JUnit compatibility, e.g when a @Rule is used
  private int handleMultipleFailures(ErrorInfo error) {
    MultipleFailureException multiFailure = (MultipleFailureException) error.getException();
    int runStatus = OK;
    for (Throwable failure : multiFailure.getFailures())
      runStatus = error(new ErrorInfo(error.getMethod(), failure));
    return runStatus;
  }
View Full Code Here

      }
      if(exceptions.size() == 1)
      {
         throw exceptions.get(0);
      }
      throw new MultipleFailureException(exceptions);
   }
View Full Code Here

    for (Throwable exception : exceptions) {
      if (exception instanceof MultipleFailureException)
        unrolled.addAll(((MultipleFailureException) exception).getFailures());
      else unrolled.add(exception);
    }
    throw new MultipleFailureException(unrolled);
  }
View Full Code Here

                return;

            if (errors.size() == 1)
                throw errors.get(0);

            throw new MultipleFailureException(errors);
        }
View Full Code Here

      }
      if(exceptions.size() == 1)
      {
         throw exceptions.get(0);
      }
      throw new MultipleFailureException(exceptions);
   }
View Full Code Here

TOP

Related Classes of org.junit.internal.runners.model.MultipleFailureException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.