Package org.junit.internal

Examples of org.junit.internal.AssumptionViolatedException


   * Assume that a particular {@link TestGroup} has been specified.
   * @param group the group that must be specified.
   */
  public static void group(TestGroup group) {
    if (!GROUPS.contains(group)) {
      throw new AssumptionViolatedException("Requires unspecified group " + group
          + " from " + GROUPS);
    }
  }
View Full Code Here


      Method method = parserClass.getMethod("getInstance");
      method.setAccessible(true);
      method.invoke(null);
    }
    catch (Throwable ex) {
      throw new AssumptionViolatedException("Requires GraphicsEnvironment that can load fonts", ex);
    }
  }
View Full Code Here

  /**
   * Check on zombie threads status.
   */
  static void checkZombies() throws AssumptionViolatedException {
    if (zombieMarker.get()) {
      throw new AssumptionViolatedException("Leaked background threads present (zombies).");
    }
  }
View Full Code Here

  /**
   * Check on zombie threads status.
   */
  static void checkZombies() throws AssumptionViolatedException {
    if (zombieMarker.get()) {
      throw new AssumptionViolatedException("Leaked background threads present (zombies).");
    }
  }
View Full Code Here

            return matcher.matches(item);
        }

        Description conditionDescription = new StringDescription();
        conditionDescription.appendValue(itemToMatchCondition).appendDescriptionOf(condition);
        throw new AssumptionViolatedException(String.format("Condition is not satisfied: %s", conditionDescription));
    }
View Full Code Here

      } catch (Throwable t) {
        throw new RuntimeException("Error collecting parameters from: " + m, t);
      }

      if (result.isEmpty()) {
        throw new AssumptionViolatedException("Parameters set should not be empty. Ignoring tests.");
      }

      parameters.addAll(result);
    }
View Full Code Here

                    if ( !scenario.wasSuccessful() ) {
                        StringBuilder builder = new StringBuilder();
                        for ( String message : scenario.getFailureMessages() ) {
                            builder.append( message ).append( "\n" );
                        }
                        eachNotifier.addFailedAssumption( new AssumptionViolatedException( builder.toString() ) );
                    }

                    // FLUSSSSSH!
                    for (FactHandle factHandle : ksession.getFactHandles()) {
                        ksession.delete(factHandle);
View Full Code Here

@PrepareForTest(MyUtils.class)
public class AssertThatJUnit45FailuresWorkTest {

  @Test(expected = AssumptionViolatedException.class)
  public void testAssumptionViolatedException() throws MyException {
    throw new AssumptionViolatedException("Not true!");
  }
View Full Code Here

            if ( !scenario.wasSuccessful() ) {
                StringBuilder builder = new StringBuilder();
                for ( String message : scenario.getFailureMessages() ) {
                    builder.append( message ).append( "\n" );
                }
                eachNotifier.addFailedAssumption( new AssumptionViolatedException( builder.toString() ) );
            }
        } catch ( Throwable t ) {
            eachNotifier.addFailure( t );
        } finally {
            // has to always be called as per junit docs
View Full Code Here

      } catch (Throwable t) {
        throw new RuntimeException("Error collecting parameters from: " + m, t);
      }

      if (result.isEmpty()) {
        throw new AssumptionViolatedException("Parameters set should not be empty. Ignoring tests.");
      }

      parameters.addAll(result);
    }
View Full Code Here

TOP

Related Classes of org.junit.internal.AssumptionViolatedException

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.