R
- The return type.public class FluentCollectionAssertion<R> extends FluentObjectAssertion<R>
Constructor and Description |
---|
FluentCollectionAssertion(Assertion creator,
Collection contents,
R returns)
Constructor.
|
FluentCollectionAssertion(Collection contents,
R returns)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
R |
contains(Object value)
Asserts that the collection contains the expected value.
|
R |
doesNotContain(Object value)
Asserts that the collection contains 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.
|
FluentCollectionAssertion<R> |
msg(String msg,
Object... args)
Allows to to specify the assertion failure message.
|
FluentCollectionAssertion<R> |
stderr()
If an error occurs, send the error message to STDERR.
|
FluentCollectionAssertion<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 FluentCollectionAssertion(Collection contents, R returns)
contents
- The byte array being tested.returns
- The object to return after the test.public FluentCollectionAssertion(Assertion creator, Collection 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 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 R isNotEmpty() throws AssertionError
AssertionError
- If assertion failed.public R isSize(int size) throws AssertionError
size
- The expected size.AssertionError
- If assertion failed.public FluentCollectionAssertion<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 FluentCollectionAssertion<R> stderr()
Assertion
stderr
in class FluentObjectAssertion<R>
public FluentCollectionAssertion<R> stdout()
Assertion
stdout
in class FluentObjectAssertion<R>
Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.