R
- The return type.public class FluentByteArrayAssertion<R> extends FluentArrayAssertion<R>
Constructor and Description |
---|
FluentByteArrayAssertion(Assertion creator,
byte[] contents,
R returns)
Constructor.
|
FluentByteArrayAssertion(byte[] contents,
R returns)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
FluentStringAssertion<R> |
base64()
Converts this byte array to a base-64 encoded string and returns it as a new assertion.
|
FluentStringAssertion<R> |
hex()
Converts this byte array to hexadecimal and returns it as a new assertion.
|
FluentByteArrayAssertion<R> |
msg(String msg,
Object... args)
Allows to to specify the assertion failure message.
|
FluentStringAssertion<R> |
spacedHex()
Converts this byte array to spaced hexadecimal and returns it as a new assertion.
|
FluentByteArrayAssertion<R> |
stderr()
If an error occurs, send the error message to STDERR.
|
FluentByteArrayAssertion<R> |
stdout()
If an error occurs, send the error message to STDOUT.
|
FluentStringAssertion<R> |
string()
Converts this byte array to a UTF-8 encoded string and returns it as a new assertion.
|
FluentStringAssertion<R> |
string(Charset cs)
Converts this byte array to a string and returns it as a new assertion.
|
contains, doesNotContain, isEmpty, isNotEmpty, isSize, item
doesNotEqual, doesNotExist, equivalent, exists, is, isAny, isEqual, isNot, isNotAny, isNotNull, isNull, isType, json, jsonSorted, passes, passes, sameAs, sameAsSerialized, sameAsSorted, serialized, string, string
returns
assertNotNull, assertNotNull, className, error
public FluentByteArrayAssertion(byte[] contents, R returns)
contents
- The byte array being tested.returns
- The object to return after the test.public FluentByteArrayAssertion(Assertion creator, byte[] contents, R returns)
creator
- The assertion that created this assertion.contents
- The byte array being tested.returns
- The object to return after the test.public FluentStringAssertion<R> string()
string
in class FluentObjectAssertion<R>
public FluentStringAssertion<R> string(Charset cs)
cs
- The charset to use to decode the string.public FluentStringAssertion<R> base64()
public FluentStringAssertion<R> hex()
public FluentStringAssertion<R> spacedHex()
public FluentByteArrayAssertion<R> msg(String msg, Object... args)
Assertion
String can contain
msg
in class FluentArrayAssertion<R>
msg
- The assertion failure message.args
- Optional message arguments.public FluentByteArrayAssertion<R> stderr()
Assertion
stderr
in class FluentArrayAssertion<R>
public FluentByteArrayAssertion<R> stdout()
Assertion
stdout
in class FluentArrayAssertion<R>
Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.