White Box Testing
Test your code
   Home      JUnit4-Assumption-With-Assume-Class
 
Assumption with Assume class

A set of methods useful for stating assumptions about the conditions in which a test is meaningful. A failed assumption does not mean the code is broken, but that the test provides no useful information. The default JUnit runner treats tests with failing assumptions as ignored. Custom runners may behave differently.
 
public static void assumeTrue(boolean b)
If called with an expression evaluating to false, the test will halt and be ignored.

public static void assumeNotNull(java.lang.Object... objects)
If called with one or more null elements in objects, the test will halt and be ignored.

public static <T> void assumeThat(T actual, org.hamcrest.Matcher<T> matcher)
Call to assume that actual satisfies the condition specified by matcher. If not, the test halts and is ignored.

public static void assumeNoException(java.lang.Throwable t)
Use to assume that an operation completes normally. If t is non-null, the test will halt and be ignored.