public class StringAssertion extends FluentStringAssertion<StringAssertion>
Constructor and Description |
---|
StringAssertion(Object text)
Creator.
|
Modifier and Type | Method and Description |
---|---|
static StringAssertion |
create(Object value)
Creator.
|
StringAssertion |
javaStrings()
When enabled, text in the message is converted to valid Java strings.
|
StringAssertion |
msg(String msg,
Object... args)
Allows to to specify the assertion failure message.
|
protected StringAssertion |
returns()
Returns the object that the fluent methods on this class should return.
|
StringAssertion |
stderr()
If an error occurs, send the error message to STDERR.
|
StringAssertion |
stdout()
If an error occurs, send the error message to STDOUT.
|
apply, contains, doesNotContain, doesNotEqual, doesNotEqualIc, doesNotMatch, doesNotMatch, doesNotMatch, endsWith, is, isEmpty, isEqual, isEqualIc, isEqualLines, isEqualSortedLines, isNot, isNotEmpty, lc, matches, matches, matches, matchesSimple, replace, replaceAll, sort, startsWith, uc, urlDecode
doesNotEqual, doesNotExist, equivalent, exists, is, isAny, isEqual, isNot, isNotAny, isNotNull, isNull, isType, json, jsonSorted, passes, passes, sameAs, sameAsSerialized, sameAsSorted, serialized, string, string, string
assertNotNull, assertNotNull, className, error
public StringAssertion(Object text)
text
- The string being wrapped.public static StringAssertion create(Object value)
value
- The string being wrapped.StringAssertion
object.protected StringAssertion returns()
FluentAssertion
returns
in class FluentAssertion<StringAssertion>
public StringAssertion msg(String msg, Object... args)
Assertion
String can contain
msg
in class FluentStringAssertion<StringAssertion>
msg
- The assertion failure message.args
- Optional message arguments.public StringAssertion stderr()
Assertion
stderr
in class FluentStringAssertion<StringAssertion>
public StringAssertion stdout()
Assertion
stdout
in class FluentStringAssertion<StringAssertion>
public StringAssertion javaStrings()
FluentStringAssertion
value.replaceAll(
javaStrings
in class FluentStringAssertion<StringAssertion>
Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.