public class CthulMatchers extends Object
| Constructor and Description |
|---|
CthulMatchers() |
| Modifier and Type | Method and Description |
|---|---|
static <T> CIs<T> |
_has(org.hamcrest.Matcher<? super T> matcher) |
static <T> InstanceOf<T> |
_instanceOf(Class<T> clazz) |
static <T> CIs<T> |
_is(org.hamcrest.Matcher<? super T> matcher) |
static <T> InstanceOf<T> |
_isA(Class<T> clazz) |
static <T> CIs<T> |
_isNot(org.hamcrest.Matcher<? super T> matcher) |
static <T> CIs<T> |
_not(org.hamcrest.Matcher<? super T> matcher) |
static <T> InstanceOf<T> |
a(Class<T> clazz) |
static ChainFactory |
all() |
static <T> AndChainMatcher.Builder<T> |
all(org.hamcrest.Matcher<? super T>... m) |
static <T> AndChainMatcher.Builder<T> |
all(org.hamcrest.Matcher<? super T> m) |
static <T> org.hamcrest.Matcher<T> |
and(Collection<? extends org.hamcrest.Matcher<? super T>> matchers) |
static <T> org.hamcrest.Matcher<T> |
and(org.hamcrest.Matcher<? super T>... matchers) |
static ChainFactory |
any() |
static <T> org.hamcrest.Matcher<T> |
any(Collection<? extends org.hamcrest.Matcher<? super T>> matchers) |
static <T> org.hamcrest.Matcher<T> |
any(org.hamcrest.Matcher<? super T>... matchers) |
static <T> AndChainMatcher.Builder<T> |
both(org.hamcrest.Matcher<? super T>... m) |
static <T> AndChainMatcher.Builder<T> |
both(org.hamcrest.Matcher<? super T> m) |
static CausedBy |
causedBy(Class<? extends Throwable> clazz) |
static CausedBy |
causedBy(Class<? extends Throwable> clazz,
org.hamcrest.Matcher<? super Throwable> matcher) |
static CausedBy |
causedBy(Class<? extends Throwable> clazz,
String message) |
static CausedBy |
causedBy(Class<? extends Throwable> clazz,
String message,
org.hamcrest.Matcher<? super Throwable> matcher) |
static CausedBy |
causedBy(org.hamcrest.Matcher<? super Throwable> matcher) |
static CausedBy |
causedBy(String message) |
static org.hamcrest.Matcher<CharSequence> |
containsPattern(Pattern p)
Can the given pattern be found in the string?
|
static org.hamcrest.Matcher<CharSequence> |
containsPattern(String regex)
Can the given pattern be found in the string?
|
static CausedBy |
directlyCausedBy(Class<? extends Throwable> clazz) |
static CausedBy |
directlyCausedBy(Class<? extends Throwable> clazz,
org.hamcrest.Matcher<? super Throwable> matcher) |
static CausedBy |
directlyCausedBy(Class<? extends Throwable> clazz,
String message) |
static CausedBy |
directlyCausedBy(Class<? extends Throwable> clazz,
String message,
org.hamcrest.Matcher<? super Throwable> matcher) |
static CausedBy |
directlyCausedBy(org.hamcrest.Matcher<? super Throwable> matcher) |
static <T> OrChainMatcher.Builder<T> |
either(org.hamcrest.Matcher<? super T>... m) |
static <T> OrChainMatcher.Builder<T> |
either(org.hamcrest.Matcher<? super T> m) |
static InstanceOf<Exception> |
exception() |
static org.hamcrest.Matcher<Object> |
exception(Class<? extends Exception> clazz,
String message) |
static <T extends Exception> |
exception(Class<T> clazz) |
static <T extends Exception> |
exception(Class<T> clazz,
org.hamcrest.Matcher<? super T> matcher) |
static <T extends Exception> |
exception(Class<T> clazz,
String message,
org.hamcrest.Matcher<? super T> matcher) |
static org.hamcrest.Matcher<Object> |
exception(org.hamcrest.Matcher<? super Exception> matcher) |
static org.hamcrest.Matcher<Object> |
exception(String message) |
static <T> CIs<T> |
has(org.hamcrest.Matcher<? super T> matcher) |
static org.hamcrest.Matcher<Proc> |
hasResult()
Does the proc complete without throwing an exception?
|
static <T> InstanceOf<T> |
instanceOf(Class<T> clazz) |
static <T,T2> AndChainMatcher.Builder<T> |
instanceThat(Class<T2> clazz,
org.hamcrest.Matcher<? super T2>... m) |
static <T,T2> AndChainMatcher.Builder<T> |
instanceThat(Class<T2> clazz,
org.hamcrest.Matcher<? super T2> m) |
static <T> CIs<T> |
is(org.hamcrest.Matcher<? super T> matcher) |
static <T> InstanceOf<T> |
isA(Class<T> clazz) |
static <T> InstanceOf<T> |
isInstanceOf(Class<T> clazz) |
static <T,T2> org.hamcrest.Matcher<T> |
isInstanceThat(Class<T2> clazz,
org.hamcrest.Matcher<? super T2>... m) |
static <T,T2> AndChainMatcher.Builder<T> |
isInstanceThat(Class<T2> clazz,
org.hamcrest.Matcher<? super T2> m) |
static <T> CIs<T> |
isNot(org.hamcrest.Matcher<? super T> matcher) |
static SomeOfChainMatcher.SomeOfChainFactory |
matches(int count) |
static <T> SomeOfChainMatcher.Builder<T> |
matches(int count,
org.hamcrest.Matcher<? super T>... matchers) |
static SomeOfChainMatcher.SomeOfChainFactory |
matches(org.hamcrest.Matcher<? super Integer> countMatcher) |
static <T> SomeOfChainMatcher.Builder<T> |
matches(org.hamcrest.Matcher<? super Integer> countMatcher,
org.hamcrest.Matcher<? super T>... matchers) |
static org.hamcrest.Matcher<CharSequence> |
matchesPattern(Pattern p)
Does the pattern match the entire string?
|
static org.hamcrest.Matcher<CharSequence> |
matchesPattern(String regex)
Does the pattern match the entire string?
|
static ExceptionMessage |
message(org.hamcrest.Matcher<? super String> messageMatcher) |
static ExceptionMessage |
messageContains(Pattern pattern) |
static ExceptionMessage |
messageContains(String regex) |
static ExceptionMessage |
messageIs(String message) |
static ExceptionMessage |
messageMatches(Pattern pattern) |
static ExceptionMessage |
messageMatches(String regex) |
static <T> NOrChainMatcher.Builder<T> |
neither(org.hamcrest.Matcher<? super T>... m) |
static <T> NOrChainMatcher.Builder<T> |
neither(org.hamcrest.Matcher<? super T> m) |
static ChainFactory |
none() |
static <T> org.hamcrest.Matcher<T> |
none(Collection<? extends org.hamcrest.Matcher<? super T>> matchers) |
static <T> org.hamcrest.Matcher<T> |
none(org.hamcrest.Matcher<? super T>... matchers) |
static <T> org.hamcrest.Matcher<T> |
nor(Collection<? extends org.hamcrest.Matcher<? super T>> matchers) |
static <T> org.hamcrest.Matcher<T> |
nor(org.hamcrest.Matcher<? super T>... matchers) |
static <T> CIs<T> |
not(org.hamcrest.Matcher<? super T> matcher) |
static <T> org.hamcrest.Matcher<T> |
or(Collection<? extends org.hamcrest.Matcher<? super T>> matchers) |
static <T> org.hamcrest.Matcher<T> |
or(org.hamcrest.Matcher<? super T>... matchers) |
static org.hamcrest.Matcher<Proc> |
raises(Class<? extends Throwable> clazz)
Does the proc raise a throwable that satisfies the condition?
|
static org.hamcrest.Matcher<Proc> |
raises(Class<? extends Throwable> clazz,
org.hamcrest.Matcher<? super Throwable> matcher)
Does the proc raise a throwable that satisfies the condition?
|
static org.hamcrest.Matcher<Proc> |
raises(Class<? extends Throwable> clazz,
String regex)
Does the proc raise a throwable that satisfies the condition?
|
static org.hamcrest.Matcher<Proc> |
raises(org.hamcrest.Matcher<? super Throwable> throwableMatcher)
Does the proc raise a throwable that satisfies the condition?
|
static org.hamcrest.Matcher<Proc> |
raises(String regex)
Does the proc raise a throwable that satisfies the condition?
|
static org.hamcrest.Matcher<Proc> |
raisesException()
Does the proc throw an exception?
|
static org.hamcrest.Matcher<Proc> |
raisesException(Class<? extends Exception> clazz)
Does the proc raise an exception that satisfies the condition?
|
static org.hamcrest.Matcher<Proc> |
raisesException(Class<? extends Exception> clazz,
String regex)
Does the proc raise an exception that satisfies the condition?
|
static org.hamcrest.Matcher<Proc> |
raisesException(org.hamcrest.Matcher<? super Exception> matcher)
Does the proc raise an exception that satisfies the condition?
|
static org.hamcrest.Matcher<Proc> |
raisesException(String regex)
Does the proc raise an exception that satisfies the condition?
|
static org.hamcrest.Matcher<Proc> |
result(org.hamcrest.Matcher<?> resultMatcher)
Does the proc return a value that satisfies the condition?
|
static org.hamcrest.Matcher<Proc> |
result(Object value)
Does the proc return a value equal to
value? |
static org.hamcrest.Matcher<Proc> |
returns()
Does the proc complete without throwing an exception?
|
static org.hamcrest.Matcher<Proc> |
returns(org.hamcrest.Matcher<?> resultMatcher)
Does the proc return a value that satisfies the condition?
|
static org.hamcrest.Matcher<Proc> |
returns(Object value)
Does the proc return a value equal to
value? |
static InstanceOf<Throwable> |
throwable() |
static org.hamcrest.Matcher<Object> |
throwable(Class<? extends Throwable> clazz,
String message) |
static <T extends Throwable> |
throwable(Class<T> clazz) |
static <T extends Throwable> |
throwable(Class<T> clazz,
org.hamcrest.Matcher<? super T> matcher) |
static <T extends Throwable> |
throwable(Class<T> clazz,
String message,
org.hamcrest.Matcher<? super T> matcher) |
static org.hamcrest.Matcher<Object> |
throwable(org.hamcrest.Matcher<? super Throwable> matcher) |
static org.hamcrest.Matcher<Object> |
throwable(String message) |
static <T> org.hamcrest.Matcher<T> |
xor(Collection<? extends org.hamcrest.Matcher<? super T>> matchers) |
static <T> org.hamcrest.Matcher<T> |
xor(org.hamcrest.Matcher<? super T>... matchers) |
public static <T> CIs<T> is(org.hamcrest.Matcher<? super T> matcher)
public static <T> CIs<T> _is(org.hamcrest.Matcher<? super T> matcher)
public static <T> CIs<T> has(org.hamcrest.Matcher<? super T> matcher)
public static <T> CIs<T> not(org.hamcrest.Matcher<? super T> matcher)
public static <T> CIs<T> _has(org.hamcrest.Matcher<? super T> matcher)
public static <T> CIs<T> _isNot(org.hamcrest.Matcher<? super T> matcher)
public static <T> CIs<T> _not(org.hamcrest.Matcher<? super T> matcher)
public static <T> CIs<T> isNot(org.hamcrest.Matcher<? super T> matcher)
public static org.hamcrest.Matcher<CharSequence> containsPattern(Pattern p)
p - public static org.hamcrest.Matcher<CharSequence> containsPattern(String regex)
regex - public static org.hamcrest.Matcher<CharSequence> matchesPattern(Pattern p)
p - public static org.hamcrest.Matcher<CharSequence> matchesPattern(String regex)
regex - public static <T,T2> AndChainMatcher.Builder<T> instanceThat(Class<T2> clazz, org.hamcrest.Matcher<? super T2>... m)
public static <T,T2> AndChainMatcher.Builder<T> instanceThat(Class<T2> clazz, org.hamcrest.Matcher<? super T2> m)
public static <T,T2> AndChainMatcher.Builder<T> isInstanceThat(Class<T2> clazz, org.hamcrest.Matcher<? super T2> m)
public static <T,T2> org.hamcrest.Matcher<T> isInstanceThat(Class<T2> clazz, org.hamcrest.Matcher<? super T2>... m)
public static <T> InstanceOf<T> a(Class<T> clazz)
public static <T> InstanceOf<T> instanceOf(Class<T> clazz)
public static <T> InstanceOf<T> isA(Class<T> clazz)
public static <T> InstanceOf<T> _isA(Class<T> clazz)
public static <T> InstanceOf<T> isInstanceOf(Class<T> clazz)
public static <T> InstanceOf<T> _instanceOf(Class<T> clazz)
public static <T> org.hamcrest.Matcher<T> and(org.hamcrest.Matcher<? super T>... matchers)
public static <T> org.hamcrest.Matcher<T> and(Collection<? extends org.hamcrest.Matcher<? super T>> matchers)
public static <T> AndChainMatcher.Builder<T> all(org.hamcrest.Matcher<? super T> m)
public static <T> AndChainMatcher.Builder<T> all(org.hamcrest.Matcher<? super T>... m)
public static ChainFactory all()
public static <T> AndChainMatcher.Builder<T> both(org.hamcrest.Matcher<? super T> m)
public static <T> AndChainMatcher.Builder<T> both(org.hamcrest.Matcher<? super T>... m)
public static ChainFactory none()
public static <T> org.hamcrest.Matcher<T> none(org.hamcrest.Matcher<? super T>... matchers)
public static <T> org.hamcrest.Matcher<T> none(Collection<? extends org.hamcrest.Matcher<? super T>> matchers)
public static <T> org.hamcrest.Matcher<T> nor(org.hamcrest.Matcher<? super T>... matchers)
public static <T> org.hamcrest.Matcher<T> nor(Collection<? extends org.hamcrest.Matcher<? super T>> matchers)
public static <T> NOrChainMatcher.Builder<T> neither(org.hamcrest.Matcher<? super T>... m)
public static <T> NOrChainMatcher.Builder<T> neither(org.hamcrest.Matcher<? super T> m)
public static <T> org.hamcrest.Matcher<T> or(Collection<? extends org.hamcrest.Matcher<? super T>> matchers)
public static <T> org.hamcrest.Matcher<T> or(org.hamcrest.Matcher<? super T>... matchers)
public static <T> org.hamcrest.Matcher<T> any(Collection<? extends org.hamcrest.Matcher<? super T>> matchers)
public static <T> org.hamcrest.Matcher<T> any(org.hamcrest.Matcher<? super T>... matchers)
public static ChainFactory any()
public static <T> OrChainMatcher.Builder<T> either(org.hamcrest.Matcher<? super T>... m)
public static <T> OrChainMatcher.Builder<T> either(org.hamcrest.Matcher<? super T> m)
public static SomeOfChainMatcher.SomeOfChainFactory matches(org.hamcrest.Matcher<? super Integer> countMatcher)
public static SomeOfChainMatcher.SomeOfChainFactory matches(int count)
public static <T> SomeOfChainMatcher.Builder<T> matches(int count, org.hamcrest.Matcher<? super T>... matchers)
public static <T> SomeOfChainMatcher.Builder<T> matches(org.hamcrest.Matcher<? super Integer> countMatcher, org.hamcrest.Matcher<? super T>... matchers)
public static <T> org.hamcrest.Matcher<T> xor(Collection<? extends org.hamcrest.Matcher<? super T>> matchers)
public static <T> org.hamcrest.Matcher<T> xor(org.hamcrest.Matcher<? super T>... matchers)
public static CausedBy directlyCausedBy(org.hamcrest.Matcher<? super Throwable> matcher)
public static CausedBy directlyCausedBy(Class<? extends Throwable> clazz, String message)
public static CausedBy directlyCausedBy(Class<? extends Throwable> clazz, org.hamcrest.Matcher<? super Throwable> matcher)
public static CausedBy directlyCausedBy(Class<? extends Throwable> clazz, String message, org.hamcrest.Matcher<? super Throwable> matcher)
public static CausedBy causedBy(Class<? extends Throwable> clazz, org.hamcrest.Matcher<? super Throwable> matcher)
public static CausedBy causedBy(Class<? extends Throwable> clazz, String message, org.hamcrest.Matcher<? super Throwable> matcher)
public static ExceptionMessage message(org.hamcrest.Matcher<? super String> messageMatcher)
public static ExceptionMessage messageIs(String message)
public static ExceptionMessage messageContains(String regex)
public static ExceptionMessage messageContains(Pattern pattern)
public static ExceptionMessage messageMatches(Pattern pattern)
public static ExceptionMessage messageMatches(String regex)
public static <T extends Exception> InstanceOf<T> exception(Class<T> clazz)
public static InstanceOf<Exception> exception()
public static <T extends Exception> org.hamcrest.Matcher<Object> exception(Class<T> clazz, String message, org.hamcrest.Matcher<? super T> matcher)
public static org.hamcrest.Matcher<Object> exception(org.hamcrest.Matcher<? super Exception> matcher)
public static org.hamcrest.Matcher<Object> exception(Class<? extends Exception> clazz, String message)
public static <T extends Exception> org.hamcrest.Matcher<Object> exception(Class<T> clazz, org.hamcrest.Matcher<? super T> matcher)
public static <T extends Throwable> InstanceOf<T> throwable(Class<T> clazz)
public static InstanceOf<Throwable> throwable()
public static <T extends Throwable> org.hamcrest.Matcher<Object> throwable(Class<T> clazz, String message, org.hamcrest.Matcher<? super T> matcher)
public static org.hamcrest.Matcher<Object> throwable(Class<? extends Throwable> clazz, String message)
public static org.hamcrest.Matcher<Object> throwable(org.hamcrest.Matcher<? super Throwable> matcher)
public static <T extends Throwable> org.hamcrest.Matcher<Object> throwable(Class<T> clazz, org.hamcrest.Matcher<? super T> matcher)
public static org.hamcrest.Matcher<Proc> raises(Class<? extends Throwable> clazz, org.hamcrest.Matcher<? super Throwable> matcher)
clazz - matcher - public static org.hamcrest.Matcher<Proc> raises(String regex)
regex - public static org.hamcrest.Matcher<Proc> raises(Class<? extends Throwable> clazz)
clazz - public static org.hamcrest.Matcher<Proc> raises(Class<? extends Throwable> clazz, String regex)
clazz - regex - public static org.hamcrest.Matcher<Proc> raises(org.hamcrest.Matcher<? super Throwable> throwableMatcher)
throwableMatcher - public static org.hamcrest.Matcher<Proc> raisesException(Class<? extends Exception> clazz)
clazz - public static org.hamcrest.Matcher<Proc> raisesException(String regex)
regex - public static org.hamcrest.Matcher<Proc> raisesException(Class<? extends Exception> clazz, String regex)
clazz - regex - public static org.hamcrest.Matcher<Proc> raisesException(org.hamcrest.Matcher<? super Exception> matcher)
matcher - public static org.hamcrest.Matcher<Proc> raisesException()
public static org.hamcrest.Matcher<Proc> result(Object value)
value?value - public static org.hamcrest.Matcher<Proc> result(org.hamcrest.Matcher<?> resultMatcher)
resultMatcher - public static org.hamcrest.Matcher<Proc> returns(org.hamcrest.Matcher<?> resultMatcher)
resultMatcher - public static org.hamcrest.Matcher<Proc> returns()
public static org.hamcrest.Matcher<Proc> returns(Object value)
value?value - public static org.hamcrest.Matcher<Proc> hasResult()
Copyright © 2015. All rights reserved.