org.sonatype.sisu.litmus.testsupport.hamcrest
Class IsNot<T>

java.lang.Object
  extended by org.hamcrest.BaseMatcher<T>
      extended by org.sonatype.sisu.litmus.testsupport.hamcrest.IsNot<T>
All Implemented Interfaces:
org.hamcrest.Matcher<T>, org.hamcrest.SelfDescribing

public class IsNot<T>
extends org.hamcrest.BaseMatcher<T>

Replacement for org.hamcrest.core.IsNot that delegates mismatch description to wrapped Matcher if set.

Since:
1.0

Constructor Summary
IsNot(org.hamcrest.Matcher<T> matcher)
           
 
Method Summary
 void describeMismatch(Object item, org.hamcrest.Description description)
           
 void describeTo(org.hamcrest.Description description)
           
 boolean matches(Object arg)
           
static
<T> org.hamcrest.Matcher<T>
not(org.hamcrest.Matcher<T> matcher)
          Inverts the rule.
static
<T> org.hamcrest.Matcher<T>
not(T value)
          This is a shortcut to the frequently used not(equalTo(x)).
 
Methods inherited from class org.hamcrest.BaseMatcher
_dont_implement_Matcher___instead_extend_BaseMatcher_, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IsNot

public IsNot(org.hamcrest.Matcher<T> matcher)
Method Detail

matches

public boolean matches(Object arg)

describeTo

public void describeTo(org.hamcrest.Description description)

describeMismatch

public void describeMismatch(Object item,
                             org.hamcrest.Description description)
Specified by:
describeMismatch in interface org.hamcrest.Matcher<T>
Overrides:
describeMismatch in class org.hamcrest.BaseMatcher<T>

not

public static <T> org.hamcrest.Matcher<T> not(org.hamcrest.Matcher<T> matcher)
Inverts the rule.


not

public static <T> org.hamcrest.Matcher<T> not(T value)
This is a shortcut to the frequently used not(equalTo(x)). For example: assertThat(cheese, is(not(equalTo(smelly)))) vs. assertThat(cheese, is(not(smelly)))



Copyright © 2008-2012 Sonatype, Inc.. All Rights Reserved.