1 package org.junit; 2 3 import org.hamcrest.Matcher; 4 5 /** 6 * An exception class used to implement <i>assumptions</i> (state in which a given test 7 * is meaningful and should or should not be executed). A test for which an assumption 8 * fails should not generate a test case failure. 9 * 10 * @see org.junit.Assume 11 * @since 4.12 12 */ 13 @SuppressWarnings("deprecation") 14 public class AssumptionViolatedException extends org.junit.internal.AssumptionViolatedException { 15 private static final long serialVersionUID = 1L; 16 17 /** 18 * An assumption exception with the given <i>actual</i> value and a <i>matcher</i> describing 19 * the expectation that failed. 20 */ 21 public <T> AssumptionViolatedException(T actual, Matcher<T> matcher) { 22 super(actual, matcher); 23 } 24 25 /** 26 * An assumption exception with a message with the given <i>actual</i> value and a 27 * <i>matcher</i> describing the expectation that failed. 28 */ 29 public <T> AssumptionViolatedException(String message, T expected, Matcher<T> matcher) { 30 super(message, expected, matcher); 31 } 32 33 /** 34 * An assumption exception with the given message only. 35 */ 36 public AssumptionViolatedException(String message) { 37 super(message); 38 } 39 40 /** 41 * An assumption exception with the given message and a cause. 42 */ 43 public AssumptionViolatedException(String assumption, Throwable t) { 44 super(assumption, t); 45 } 46 } 47