R
- The return type.public class FluentArrayAssertion<R> extends FluentObjectAssertion<R>
Constructor and Description |
---|
FluentArrayAssertion(Assertion creator,
Object contents,
R returns)
Constructor.
|
FluentArrayAssertion(Object contents,
R returns)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
R |
contains(Object value)
Asserts that the array contains the expected value.
|
R |
doesNotContain(Object value)
Asserts that the array does not contain the expected value.
|
R |
isEmpty()
Asserts that the collection exists and is empty.
|
R |
isNotEmpty()
Asserts that the collection exists and is not empty.
|
R |
isSize(int size)
Asserts that the collection exists and is the specified size.
|
FluentObjectAssertion<R> |
item(int index)
Returns an object assertion on the item specified at the specified index.
|
FluentArrayAssertion<R> |
msg(String msg,
Object... args)
Allows to to specify the assertion failure message.
|
FluentArrayAssertion<R> |
stderr()
If an error occurs, send the error message to STDERR.
|
FluentArrayAssertion<R> |
stdout()
If an error occurs, send the error message to STDOUT.
|
doesNotEqual, doesNotExist, equivalent, exists, is, isAny, isEqual, isNot, isNotAny, isNotNull, isNull, isType, json, jsonSorted, passes, passes, sameAs, sameAsSerialized, sameAsSorted, serialized, string, string, string
returns
assertNotNull, assertNotNull, className, error
public FluentArrayAssertion(Object contents, R returns)
contents
- The byte array being tested.returns
- The object to return after the test.public FluentArrayAssertion(Assertion creator, Object 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 R isEmpty() throws AssertionError
AssertionError
- If assertion failed.public R isNotEmpty() throws AssertionError
AssertionError
- If assertion failed.public R isSize(int size) throws AssertionError
size
- The expected size.AssertionError
- If assertion failed.public R contains(Object value) throws AssertionError
value
- The value to check for.AssertionError
- If assertion failed.public R doesNotContain(Object value) throws AssertionError
value
- The value to check for.AssertionError
- If assertion failed.public FluentObjectAssertion<R> item(int index)
If the array is FluentObjectAssertion.exists()
returns
index
- The index of the item to retrieve from the array.public FluentArrayAssertion<R> msg(String msg, Object... args)
Assertion
String can contain
msg
in class FluentObjectAssertion<R>
msg
- The assertion failure message.args
- Optional message arguments.public FluentArrayAssertion<R> stderr()
Assertion
stderr
in class FluentObjectAssertion<R>
public FluentArrayAssertion<R> stdout()
Assertion
stdout
in class FluentObjectAssertion<R>
Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.