001 package org.junit; 002 003 import org.hamcrest.Matcher; 004 005 /** 006 * An exception class used to implement <i>assumptions</i> (state in which a given test 007 * is meaningful and should or should not be executed). A test for which an assumption 008 * fails should not generate a test case failure. 009 * 010 * @see org.junit.Assume 011 */ 012 public class AssumptionViolatedException extends org.junit.internal.AssumptionViolatedException { 013 private static final long serialVersionUID = 1L; 014 015 public AssumptionViolatedException(String assumption, boolean valueMatcher, Object value, Matcher<?> matcher) { 016 super(assumption, valueMatcher, value, matcher); 017 } 018 019 /** 020 * An assumption exception with the given <i>value</i> (String or 021 * Throwable) and an additional failing {@link Matcher}. 022 */ 023 public AssumptionViolatedException(Object value, Matcher<?> matcher) { 024 super(value, matcher); 025 } 026 027 /** 028 * An assumption exception with the given <i>value</i> (String or 029 * Throwable) and an additional failing {@link Matcher}. 030 */ 031 public AssumptionViolatedException(String assumption, Object value, Matcher<?> matcher) { 032 super(assumption, value, matcher); 033 } 034 035 /** 036 * An assumption exception with the given message only. 037 */ 038 public AssumptionViolatedException(String assumption) { 039 super(assumption); 040 } 041 042 /** 043 * An assumption exception with the given message and a cause. 044 */ 045 public AssumptionViolatedException(String assumption, Throwable t) { 046 super(assumption, t); 047 } 048 }