public interface StringFluent<Value extends String,BaseFluent,TheFluent extends BaseFluent,This extends StringFluent<Value,BaseFluent,TheFluent,This>> extends org.cthul.matchers.fluent.ext.ExtensibleFluentStep<Value,BaseFluent,TheFluent,This>, ComparableFluent<String,Value,BaseFluent,TheFluent,This>
| Modifier and Type | Interface and Description |
|---|---|
static interface |
StringFluent.AndChain<Value extends String,TheFluent,This extends StringFluent.AndChain<Value,TheFluent,This>> |
static class |
StringFluent.Assert<Value extends String> |
static interface |
StringFluent.OrChain<Value extends String,TheFluent,This extends StringFluent.OrChain<Value,TheFluent,This>> |
static class |
StringFluent.Step<Value extends String,TheFluent,This extends StringFluent.Step<Value,TheFluent,This>> |
| Modifier and Type | Method and Description |
|---|---|
StringFluent.AndChain<Value,TheFluent,?> |
all() |
StringFluent.AndChain<Value,TheFluent,?> |
both() |
StringFluent.AndChain<Value,TheFluent,?> |
both(org.hamcrest.Matcher<? super Value> matcher) |
default TheFluent |
contains(String substring)
|
default TheFluent |
containsInOrder(Iterable<String> substrings)
Creates a matcher of
String that matches when the examined string contains all of
the specified substrings, regardless of the order of their appearance. |
default TheFluent |
containsPattern(Pattern p)
Can the given pattern be found in the string?
|
default TheFluent |
containsPattern(String regex)
Can the given pattern be found in the string?
|
StringFluent.OrChain<Value,TheFluent,?> |
either() |
StringFluent.OrChain<Value,TheFluent,?> |
either(org.hamcrest.Matcher<? super Value> matcher) |
default TheFluent |
endsWith(String suffix)
|
default TheFluent |
equalToIgnoringCase(String expectedString)
Creates a matcher of
String that matches when the examined string is equal to
the specified expectedString, ignoring case. |
default TheFluent |
equalToIgnoringWhiteSpace(String expectedString)
Creates a matcher of
String that matches when the examined string is equal to
the specified expectedString, when whitespace differences are (mostly) ignored. |
default TheFluent |
isEmpty()
Creates a matcher of
String that matches when the examined string has zero length. |
default TheFluent |
isEmptyOrNull()
Creates a matcher of
String that matches when the examined string is null, or
has zero length. |
default TheFluent |
matches(Pattern p)
Does the pattern match the entire string?
|
default TheFluent |
matches(String regex)
Does the pattern match the entire string?
|
default TheFluent |
startsWith(String prefix)
|
comparesEqualTo, greaterThan, greaterThanOrEqualTo, lessThan, lessThanOrEqualToget, get, hasToString, hasToString, isIn, isIn, isOneOf, notNullValue, nullValue, sameInstance, theInstance__, __, __, allOf, anyOf, as, as, equalTo, has, has, has, has, hasNot, hasNot, hasNot, hasNot, hasType, is, is, is, isA, isNot, isNot, isNot, noneOf, not, not, not, not, notdefault TheFluent containsPattern(String regex)
regex - ContainsPattern.containsPattern(java.lang.String)default TheFluent containsPattern(Pattern p)
p - ContainsPattern.containsPattern(java.util.regex.Pattern)default TheFluent matches(String regex)
regex - ContainsPattern.matchesPattern(java.lang.String)default TheFluent matches(Pattern p)
p - ContainsPattern.matchesPattern(java.util.regex.Pattern)default TheFluent contains(String substring)
String contains the specified
String anywhere.
For example:
assertThat("myStringOfNote", containsString("ring"))substring - the substring that the returned matcher will expect to find within any examined stringStringContains.containsString(java.lang.String)default TheFluent startsWith(String prefix)
String starts with the specified
String.
For example:
assertThat("myStringOfNote", startsWith("my"))prefix - the substring that the returned matcher will expect at the start of any examined stringStringStartsWith.startsWith(java.lang.String)default TheFluent endsWith(String suffix)
String ends with the specified
String.
For example:
assertThat("myStringOfNote", endsWith("Note"))suffix - the substring that the returned matcher will expect at the end of any examined stringStringEndsWith.endsWith(java.lang.String)default TheFluent equalToIgnoringCase(String expectedString)
String that matches when the examined string is equal to
the specified expectedString, ignoring case.
For example:
assertThat("Foo", equalToIgnoringCase("FOO"))expectedString - the expected value of matched stringsIsEqualIgnoringCase.equalToIgnoringCase(java.lang.String)default TheFluent equalToIgnoringWhiteSpace(String expectedString)
String that matches when the examined string is equal to
the specified expectedString, when whitespace differences are (mostly) ignored. To be
exact, the following whitespace rules are applied:
For example:
assertThat(" my\tfoo bar ", equalToIgnoringWhiteSpace(" my foo bar"))expectedString - the expected value of matched stringsIsEqualIgnoringWhiteSpace.equalToIgnoringWhiteSpace(java.lang.String)default TheFluent isEmpty()
String that matches when the examined string has zero length.
For example:
assertThat("", isEmptyString())IsEmptyString.isEmptyString()default TheFluent isEmptyOrNull()
String that matches when the examined string is null, or
has zero length.
For example:
assertThat(((String)null), isEmptyString())
IsEmptyString.isEmptyOrNullString()default TheFluent containsInOrder(Iterable<String> substrings)
String that matches when the examined string contains all of
the specified substrings, regardless of the order of their appearance.
For example:
assertThat("myfoobarbaz", stringContainsInOrder(Arrays.asList("bar", "foo")))substrings - the substrings that must be contained within matching stringsStringContainsInOrder.stringContainsInOrder(java.lang.Iterable)StringFluent.OrChain<Value,TheFluent,?> either()
either in interface ComparableFluent<String,Value extends String,BaseFluent,TheFluent extends BaseFluent,This extends StringFluent<Value,BaseFluent,TheFluent,This>>either in interface org.cthul.matchers.fluent.ext.ExtensibleFluentStep<Value extends String,BaseFluent,TheFluent extends BaseFluent,This extends StringFluent<Value,BaseFluent,TheFluent,This>>either in interface org.cthul.matchers.fluent.FluentStep<Value extends String,BaseFluent>either in interface ObjectFluent<Value extends String,BaseFluent,TheFluent extends BaseFluent,This extends StringFluent<Value,BaseFluent,TheFluent,This>>StringFluent.OrChain<Value,TheFluent,?> either(org.hamcrest.Matcher<? super Value> matcher)
either in interface ComparableFluent<String,Value extends String,BaseFluent,TheFluent extends BaseFluent,This extends StringFluent<Value,BaseFluent,TheFluent,This>>either in interface org.cthul.matchers.fluent.ext.ExtensibleFluentStep<Value extends String,BaseFluent,TheFluent extends BaseFluent,This extends StringFluent<Value,BaseFluent,TheFluent,This>>either in interface org.cthul.matchers.fluent.FluentStep<Value extends String,BaseFluent>either in interface ObjectFluent<Value extends String,BaseFluent,TheFluent extends BaseFluent,This extends StringFluent<Value,BaseFluent,TheFluent,This>>StringFluent.AndChain<Value,TheFluent,?> both()
both in interface ComparableFluent<String,Value extends String,BaseFluent,TheFluent extends BaseFluent,This extends StringFluent<Value,BaseFluent,TheFluent,This>>both in interface org.cthul.matchers.fluent.ext.ExtensibleFluentStep<Value extends String,BaseFluent,TheFluent extends BaseFluent,This extends StringFluent<Value,BaseFluent,TheFluent,This>>both in interface org.cthul.matchers.fluent.FluentStep<Value extends String,BaseFluent>both in interface ObjectFluent<Value extends String,BaseFluent,TheFluent extends BaseFluent,This extends StringFluent<Value,BaseFluent,TheFluent,This>>StringFluent.AndChain<Value,TheFluent,?> both(org.hamcrest.Matcher<? super Value> matcher)
both in interface ComparableFluent<String,Value extends String,BaseFluent,TheFluent extends BaseFluent,This extends StringFluent<Value,BaseFluent,TheFluent,This>>both in interface org.cthul.matchers.fluent.ext.ExtensibleFluentStep<Value extends String,BaseFluent,TheFluent extends BaseFluent,This extends StringFluent<Value,BaseFluent,TheFluent,This>>both in interface org.cthul.matchers.fluent.FluentStep<Value extends String,BaseFluent>both in interface ObjectFluent<Value extends String,BaseFluent,TheFluent extends BaseFluent,This extends StringFluent<Value,BaseFluent,TheFluent,This>>StringFluent.AndChain<Value,TheFluent,?> all()
all in interface ComparableFluent<String,Value extends String,BaseFluent,TheFluent extends BaseFluent,This extends StringFluent<Value,BaseFluent,TheFluent,This>>all in interface org.cthul.matchers.fluent.ext.ExtensibleFluentStep<Value extends String,BaseFluent,TheFluent extends BaseFluent,This extends StringFluent<Value,BaseFluent,TheFluent,This>>all in interface org.cthul.matchers.fluent.FluentStep<Value extends String,BaseFluent>all in interface ObjectFluent<Value extends String,BaseFluent,TheFluent extends BaseFluent,This extends StringFluent<Value,BaseFluent,TheFluent,This>>Copyright © 2015. All Rights Reserved.