Examples of MultipleFailureException


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

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

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

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

    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

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

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

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

    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

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

                return;

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

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

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

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

Examples of org.junit.runners.model.MultipleFailureException

        if (stuckThread != null) {
            Exception stuckThreadException =
                new Exception ("Appears to be stuck in thread " +
                               stuckThread.getName());
            stuckThreadException.setStackTrace(getStackTrace(stuckThread));
            return new MultipleFailureException   
                (Arrays.<Throwable>asList(currThreadException, stuckThreadException));
        } else {
            return currThreadException;
        }
    }
View Full Code Here

Examples of org.junit.runners.model.MultipleFailureException

          // the stack (where they can be ignored or obscured).
          if (cumulative.size() == 1) {
            throw cumulative.get(0);
          }
          if (cumulative.size() > 1) {
            throw new MultipleFailureException(cumulative);
          }
        }
      };
    }
View Full Code Here

Examples of org.junit.runners.model.MultipleFailureException

        final List<Throwable> errors = runtime.getErrors();
        for (final String snippet : runtime.getSnippets()) {
            errors.add(new CucumberException("Missing snippet: " + snippet));
        }
        if (!errors.isEmpty()) {
            throw new MultipleFailureException(errors);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.