public class ActionResultAssert extends org.assertj.core.api.AbstractAssert<ActionResultAssert,Action.ActionResult>
Action.ActionResult.| Modifier | Constructor and Description |
|---|---|
protected |
ActionResultAssert(Action.ActionResult actual) |
| Modifier and Type | Method and Description |
|---|---|
static ActionResultAssert |
assertThat(Action.ActionResult actual)
Creates a
ActionResultAssert. |
ActionResultAssert |
doesNotHaveInSession(String key)
Asserts that the
Action.ActionResult doest not have the given key in its session. |
ActionResultAssert |
hasCharset(Charset charset)
Asserts that the
Action.ActionResult has the given charset. |
<T> ActionResultAssert |
hasContent(Class<T> klass,
T body)
Asserts that the
Action.ActionResult has the given content. |
ActionResultAssert |
hasContent(String content)
Asserts that the
Action.ActionResult has the given content. |
ActionResultAssert |
hasContentMatch(String regex)
Asserts that the
Action.ActionResult has a content matching the given regex. |
ActionResultAssert |
hasContentType(String contentType)
Asserts that the
Action.ActionResult has the given content type. |
ActionResultAssert |
hasFullContentType(String fullContentType)
Asserts that the
Action.ActionResult has the given content type and charset. |
ActionResultAssert |
hasHeader(String headerName)
Asserts that the result contains the given header.
|
ActionResultAssert |
hasInContent(String inBody)
Asserts that the
Action.ActionResult has the given String in its body. |
ActionResultAssert |
hasInSession(String key,
String value)
Asserts that the
Action.ActionResult has the given key-value in its session. |
ActionResultAssert |
hasStatus(Integer statusCode)
Asserts that the
Action.ActionResult has the given HTTP status. |
ActionResultAssert |
isNotNull()
Asserts that the result is not null.
|
ActionResultAssert |
sessionIsEmpty()
Asserts that the
Action.ActionResult has an empty session. |
ActionResultAssert |
sessionIsNotEmpty()
Asserts that the
Action.ActionResult's session is not empty. |
StatusAssert |
status()
Creates a
StatusAssert. |
as, as, asList, asString, describedAs, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, equals, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, inBinary, inHexadecimal, is, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, overridingErrorMessage, usingComparator, usingDefaultComparator, withThreadDumpOnErrorprotected ActionResultAssert(Action.ActionResult actual)
public static ActionResultAssert assertThat(Action.ActionResult actual)
ActionResultAssert.actual - the resultpublic StatusAssert status()
StatusAssert.public ActionResultAssert hasStatus(Integer statusCode)
Action.ActionResult has the given HTTP status.statusCode - the status codeActionResultAssertpublic ActionResultAssert hasContentType(String contentType)
Action.ActionResult has the given content type.contentType - the content typeActionResultAssertpublic ActionResultAssert hasFullContentType(String fullContentType)
Action.ActionResult has the given content type and charset.fullContentType - the full content type (content type and charset)ActionResultAssertpublic ActionResultAssert hasCharset(Charset charset)
Action.ActionResult has the given charset.charset - the charsetActionResultAssertpublic ActionResultAssert hasInSession(String key, String value)
Action.ActionResult has the given key-value in its session.key - the keyvalue - the valueActionResultAssertpublic ActionResultAssert doesNotHaveInSession(String key)
Action.ActionResult doest not have the given key in its session.key - the keyActionResultAssertpublic ActionResultAssert sessionIsEmpty()
Action.ActionResult has an empty session.ActionResultAssertpublic ActionResultAssert sessionIsNotEmpty()
Action.ActionResult's session is not empty.ActionResultAssertpublic <T> ActionResultAssert hasContent(Class<T> klass, T body)
Action.ActionResult has the given content.klass - the body's classbody - the bodyActionResultAssertpublic ActionResultAssert hasContent(String content)
Action.ActionResult has the given content. If the actual
content is not a String, toString is called before doing the comparison.content - the contentActionResultAssertpublic ActionResultAssert hasInContent(String inBody)
Action.ActionResult has the given String in its body. If the
actual body is not a String, toString is called before doing the comparison.inBody - the text that should be found in the bodyActionResultAssertpublic ActionResultAssert hasContentMatch(String regex)
Action.ActionResult has a content matching the given regex.regex - the regexActionResultAssertpublic ActionResultAssert isNotNull()
isNotNull in interface org.assertj.core.api.Assert<ActionResultAssert,Action.ActionResult>isNotNull in class org.assertj.core.api.AbstractAssert<ActionResultAssert,Action.ActionResult>ActionResultAssertpublic ActionResultAssert hasHeader(String headerName)
headerName - the header nameActionResultAssertCopyright © 2013–2015 Wisdom Framework. All rights reserved.