Package org.junit.internal

Examples of org.junit.internal.AssumptionViolatedException


            }
        };

        @Test
        public void succeeds() {
            throw new AssumptionViolatedException("don't run");
        }
View Full Code Here


            }
        };

        @Test
        public void fails() {
            throw new AssumptionViolatedException("test failure");
        }
View Full Code Here

    }

    public static class AssumptionViolatedAtParentLevelTest {
        @BeforeClass
        public static void beforeClass() {
            throw new AssumptionViolatedException("Thrown from @BeforeClass");
        }
View Full Code Here

        @Test
        public void ignore() {}

        @Test
        public void assumptionFail() {
            throw new AssumptionViolatedException("Thrown from @Test");
        }
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

                    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 {
View Full Code Here

  /**
   * Include at the start of tests to skip them if the FS is not enabled.
   */
  protected void assumeEnabled() {
    if (!contract.isEnabled())
      throw new AssumptionViolatedException("test cases disabled for " + contract);
  }
View Full Code Here

   * @param failure what failed
   * @throws AssumptionViolatedException always
   */
  public static void downgrade(String message, Throwable failure) {
    LOG.warn("Downgrading test " + message, failure);
    AssumptionViolatedException ave =
      new AssumptionViolatedException(failure, null);
    throw ave;
  }
View Full Code Here

   * @param message message to use in the text
   * @throws AssumptionViolatedException always
   */
  public static void skip(String message) {
    LOG.info("Skipping: {}", message);
    throw new AssumptionViolatedException(message);
  }
View Full Code Here

    try {
      assertIsDirectory(path);
    } catch (AssertionError failure) {
      if (isSupported(IS_BLOBSTORE)) {
        // file/directory hack surfaces here
        throw new AssumptionViolatedException(failure.toString()).initCause(failure);
      }
      // else: rethrow
      throw failure;
    }
    Path child = new Path(path, "child");
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.